Thread
:
How do I Address A Worksheet From A Cell Reference?
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
How do I Address A Worksheet From A Cell Reference?
You could use this but it is very seldom necessary to select
Sheets(Range("f4").Value).Select
Sheets(Range("f4").Value). Range("HL5:HZ8").Copy _
Sheets("Report").range("DR502:EF505")
or if only values to copy (range must be the same size)
Sheets("Report").range("DR502:EF505").value= _
Sheets(Range("f4").Value). Range("HL5:HZ8").value
--
Don Guillett
SalesAid Software
"GeorgeF" wrote in message
...
The following was generated by the macro recorder:
Sheets("project01").Select
Range("HL5:HZ8").Select
Selection.Copy
Sheets("Report").Select
Range("DR502:EF505").Select
ActiveSheet.Paste
I need to be able to select the sheet that I am copying things from based
on
a cell value. For example, cell A1 could have "project06" or "project22"
at
any given time when this macro runs. How do I accomplish this "indirect"
addressing? i.e., can I somehow use something like "Sheets("cell
A1").Select"? (I am not a
VB
programmer.)
Thank you.
George
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]