Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a macro i can use to copy a cell +1 Bill M. Excel Discussion (Misc queries) 4 February 12th 08 02:59 PM
Copy cell to another cell using Macro Robert B. Excel Worksheet Functions 16 November 7th 07 06:43 PM
copy excel cell to cell in word table using excel macro jthurnwps Excel Discussion (Misc queries) 0 July 21st 06 07:11 PM
Using macro to copy a part of a cell content to next cell Charles Excel Discussion (Misc queries) 6 May 31st 06 05:57 AM
Macro help - copy a cell down gjcase Excel Discussion (Misc queries) 3 September 4th 05 05:09 AM


All times are GMT +1. The time now is 10:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"