Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello happy Thursday!!
Instead of having: A range in the same worksheet starting in column "A" as shown below, how can I tell the program that I need the Range "A" from sheet 2. I tried: Range(Sheet2:A .......) But did not work. Anyone??? For Each myRecord In Range("A80:A" & _ Range("A" & Rows.Count).End(xlUp).Row) 'For Each myRecord In Range("write_this") Thanks alot in advance |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
try sheets("Sheet2").range...
"N.F" wrote: Hello happy Thursday!! Instead of having: A range in the same worksheet starting in column "A" as shown below, how can I tell the program that I need the Range "A" from sheet 2. I tried: Range(Sheet2:A .......) But did not work. Anyone??? For Each myRecord In Range("A80:A" & _ Range("A" & Rows.Count).End(xlUp).Row) 'For Each myRecord In Range("write_this") Thanks alot in advance |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Couldnt get it to work:
This part of my code that when I run it it does work for the given range: For Each myRecord In Range("A80:A" & _ Range("A" & Rows.Count).End(xlUp).Row) However when I change the range and specify it in a different sheet it does not work. Below you can see what I tried but did not work: For Each myRecord In Sheets("Sheet2").Range("A1:A" & _ Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Row) "bj" wrote: try sheets("Sheet2").range... "N.F" wrote: Hello happy Thursday!! Instead of having: A range in the same worksheet starting in column "A" as shown below, how can I tell the program that I need the Range "A" from sheet 2. I tried: Range(Sheet2:A .......) But did not work. Anyone??? For Each myRecord In Range("A80:A" & _ Range("A" & Rows.Count).End(xlUp).Row) 'For Each myRecord In Range("write_this") Thanks alot in advance |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I don't know if it will work, but try
sheets("Sheet2").select just before the for statement and just before the next statement the Rows.count statement may be looking at thew active sheet and Not sheet2 "N.F" wrote: Couldnt get it to work: This part of my code that when I run it it does work for the given range: For Each myRecord In Range("A80:A" & _ Range("A" & Rows.Count).End(xlUp).Row) However when I change the range and specify it in a different sheet it does not work. Below you can see what I tried but did not work: For Each myRecord In Sheets("Sheet2").Range("A1:A" & _ Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Row) "bj" wrote: try sheets("Sheet2").range... "N.F" wrote: Hello happy Thursday!! Instead of having: A range in the same worksheet starting in column "A" as shown below, how can I tell the program that I need the Range "A" from sheet 2. I tried: Range(Sheet2:A .......) But did not work. Anyone??? For Each myRecord In Range("A80:A" & _ Range("A" & Rows.Count).End(xlUp).Row) 'For Each myRecord In Range("write_this") Thanks alot in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automatic range - named range give me circular reference... | 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) | |||
formula to sort a range so that it matches the exact rows of a column that is outside that range? | Excel Discussion (Misc queries) | |||
How to count dates within a certain range in a column with mutiple date range entries | Excel Worksheet Functions |