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
|