Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
HI:
Can you tell me how to loop to the end of the data range without this being static? Please numrows = Range("A2", Range("A2").End(xlDown)).Rows.Count Range("A2").EntireColumn.Select For x = 1 To 3000 Thanks so much Just need to go to the end value which will change everytime the report is ran by user |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
if it is always column A then
Dim myRow as integer myrow=2 'this starts to run on row 2 do until cells(myRow,1)="" 'the one is the column myRow=myRow+1 'increments as long as the cell is not blank loop thats it, this is assuming of course that there are no blanks in column A. If you want the data in the last cell set a variable = to cells(myRow,1) after the loop. -John "mniccole" wrote: HI: Can you tell me how to loop to the end of the data range without this being static? Please numrows = Range("A2", Range("A2").End(xlDown)).Rows.Count Range("A2").EntireColumn.Select For x = 1 To 3000 Thanks so much Just need to go to the end value which will change everytime the report is ran by user |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
And after you finish this loop I think what you wanted to see was this:
x=1 to myRow -John "John Bundy" wrote: if it is always column A then Dim myRow as integer myrow=2 'this starts to run on row 2 do until cells(myRow,1)="" 'the one is the column myRow=myRow+1 'increments as long as the cell is not blank loop thats it, this is assuming of course that there are no blanks in column A. If you want the data in the last cell set a variable = to cells(myRow,1) after the loop. -John "mniccole" wrote: HI: Can you tell me how to loop to the end of the data range without this being static? Please numrows = Range("A2", Range("A2").End(xlDown)).Rows.Count Range("A2").EntireColumn.Select For x = 1 To 3000 Thanks so much Just need to go to the end value which will change everytime the report is ran by user |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro question | Excel Worksheet Functions | |||
Inputting data to one worksheet for it effect another | Excel Discussion (Misc queries) | |||
Add a data series dynamically to a named range? | Charts and Charting in Excel | |||
Inserting Filtered RC cell information into other worksheets | Excel Discussion (Misc queries) | |||
Match function...random search? | Excel Worksheet Functions |