Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro that uses a cell value to copy another cell
This is for a game that I'm almost done with. Its hard enough for me to
explain this let alone try to figure out the code for it... I have entered in Sheet2, range F1:F30 as follows: F 1 B1 2 F1 3 Z1 4 D1 5 G1 6 AA1 and so on. These are randomly sorted. In Sheet4, A1:AD1 I have an image in each cell. Those get copied and pasted somewhere in Sheet1. Sheet2, F1 is frequently deleted with shift cells up. I need my macro to copy in Sheet4 the cell that Sheet2, F1 indicates. Something like: Sub GetPicture() Sheets("Sheet4").Range("whatever the value in Sheet2 F1 says").Copy Sheets("Sheet1").Range("D6").Select ActiveSheet.Paste End Sub Thank you, Jeff Jensen |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro that uses a cell value to copy another cell
Maybe something like this:
Sub GetPicture() Sheets("Sheet4").Range(Sheets("Sheet2").Range("F1" ).Value).Copy Sheets("Sheet1").Range("D6").Select ActiveSheet.Paste End Sub -- "Jeff Jensen" wrote in message ... This is for a game that I'm almost done with. It's hard enough for me to explain this let alone try to figure out the code for it... I have entered in Sheet2, range F1:F30 as follows: F 1 B1 2 F1 3 Z1 4 D1 5 G1 6 AA1 and so on. These are randomly sorted. In Sheet4, A1:AD1 I have an image in each cell. Those get copied and pasted somewhere in Sheet1. Sheet2, F1 is frequently deleted with shift cells up. I need my macro to copy in Sheet4 the cell that Sheet2, F1 indicates. Something like: Sub GetPicture() Sheets("Sheet4").Range("whatever the value in Sheet2 F1 says").Copy Sheets("Sheet1").Range("D6").Select ActiveSheet.Paste End Sub Thank you, Jeff Jensen |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro that uses a cell value to copy another cell
Thank you PCLIVE, it's perfect.
I didn't think it was going to be as basic as that. Jeff Jensen "PCLIVE" wrote: Maybe something like this: Sub GetPicture() Sheets("Sheet4").Range(Sheets("Sheet2").Range("F1" ).Value).Copy Sheets("Sheet1").Range("D6").Select ActiveSheet.Paste End Sub -- "Jeff Jensen" wrote in message ... This is for a game that I'm almost done with. It's hard enough for me to explain this let alone try to figure out the code for it... I have entered in Sheet2, range F1:F30 as follows: F 1 B1 2 F1 3 Z1 4 D1 5 G1 6 AA1 and so on. These are randomly sorted. In Sheet4, A1:AD1 I have an image in each cell. Those get copied and pasted somewhere in Sheet1. Sheet2, F1 is frequently deleted with shift cells up. I need my macro to copy in Sheet4 the cell that Sheet2, F1 indicates. Something like: Sub GetPicture() Sheets("Sheet4").Range("whatever the value in Sheet2 F1 says").Copy Sheets("Sheet1").Range("D6").Select ActiveSheet.Paste End Sub Thank you, Jeff Jensen |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro that uses a cell value to copy another cell
You're welcome!
-- "Jeff Jensen" wrote in message ... Thank you PCLIVE, it's perfect. I didn't think it was going to be as basic as that. Jeff Jensen "PCLIVE" wrote: Maybe something like this: Sub GetPicture() Sheets("Sheet4").Range(Sheets("Sheet2").Range("F1" ).Value).Copy Sheets("Sheet1").Range("D6").Select ActiveSheet.Paste End Sub -- "Jeff Jensen" wrote in message ... This is for a game that I'm almost done with. It's hard enough for me to explain this let alone try to figure out the code for it... I have entered in Sheet2, range F1:F30 as follows: F 1 B1 2 F1 3 Z1 4 D1 5 G1 6 AA1 and so on. These are randomly sorted. In Sheet4, A1:AD1 I have an image in each cell. Those get copied and pasted somewhere in Sheet1. Sheet2, F1 is frequently deleted with shift cells up. I need my macro to copy in Sheet4 the cell that Sheet2, F1 indicates. Something like: Sub GetPicture() Sheets("Sheet4").Range("whatever the value in Sheet2 F1 says").Copy Sheets("Sheet1").Range("D6").Select ActiveSheet.Paste End Sub Thank you, Jeff Jensen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a macro i can use to copy a cell +1 | Excel Discussion (Misc queries) | |||
Copy cell to another cell using Macro | Excel Worksheet Functions | |||
copy excel cell to cell in word table using excel macro | Excel Discussion (Misc queries) | |||
Using macro to copy a part of a cell content to next cell | Excel Discussion (Misc queries) | |||
Macro help - copy a cell down | Excel Discussion (Misc queries) |