Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using specifieds in a range
Hello, Again,
I am using D = .Range("G2").Value E = .Range("H2").Value to give me two cell references (as values from the cells G2 and H2) which i then want to use to form a range by something like ..Range(A:B).value but this doesn't work so is obviously wrong, can anyone help, thanks Andy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using specifieds in a range
in addition, yes i have jus realised i left out the"" but this is bringing up an error when i run the macro, ..Range ("A1:R4") & .Range("D:E").Select where D and E are as previous and A1 to R4 is a seperate range |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using specifieds in a range
.Range(D & ":" & E).Value
-- Regards, Tom Ogilvy "Momo" wrote in message ... Hello, Again, I am using D = .Range("G2").Value E = .Range("H2").Value to give me two cell references (as values from the cells G2 and H2) which i then want to use to form a range by something like .Range(A:B).value but this doesn't work so is obviously wrong, can anyone help, thanks Andy |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using specifieds in a range
The following works:
Sub test() D = Range("G2").Value ' Contains A1 E = Range("H2").Value ' Contains B6 Range(D & ":" & E).Select ' Range("A1:B6") is selected End Sub HTH "Momo" wrote: in addition, yes i have jus realised i left out the"" but this is bringing up an error when i run the macro, .Range ("A1:R4") & .Range("D:E").Select where D and E are as previous and A1 to R4 is a seperate range |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Selecting range in list of range names depending on a cell informa | Excel Discussion (Misc queries) | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming | |||
how to? set my range= my UDF argument (range vs. value in range) [advanced?] | Excel Programming |