Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a Loop that goes through a set of data in range A1:B20. It's a
"Do While" loop that loops while the cells in column A have a specific value. Cell B1 is always Blank and I want to assign this variable the cells address. Example: Var x = ("B1"). Then at the end of the loop I want the active cell to be the cell reference in Var x. Any idea how to achieve this??? Thanks, Chris |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chris,
I'm not exactly sure what you're after, but try something like Dim Rng As Range Set Rng = Range("B1") -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com wrote in message oups.com... I have a Loop that goes through a set of data in range A1:B20. It's a "Do While" loop that loops while the cells in column A have a specific value. Cell B1 is always Blank and I want to assign this variable the cells address. Example: Var x = ("B1"). Then at the end of the loop I want the active cell to be the cell reference in Var x. Any idea how to achieve this??? Thanks, Chris |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chip-
Yeah...I wasn't that clear. The Active cell ("B1" above) is dynamic. It isn't always B1. How do I set the variable to the cell that is blank and hold that value? Something like... Dim Rng As Range Set Rng = ActiveCell.Address ????? Thanks, Chris |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
Dim Rng As Range Set Rng = ActiveCell -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com wrote in message oups.com... Chip- Yeah...I wasn't that clear. The Active cell ("B1" above) is dynamic. It isn't always B1. How do I set the variable to the cell that is blank and hold that value? Something like... Dim Rng As Range Set Rng = ActiveCell.Address ????? Thanks, Chris |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dim rng as range
' looping structure if isempty(ActiveCell) then set rng = ActiveCell End if ' loop ends rng.Activate --- or ----- Dim x as String x = ActiveCell.Address ' time passes Range(x).Activate -- Regards, Tom Ogilvy wrote in message oups.com... Chip- Yeah...I wasn't that clear. The Active cell ("B1" above) is dynamic. It isn't always B1. How do I set the variable to the cell that is blank and hold that value? Something like... Dim Rng As Range Set Rng = ActiveCell.Address ????? Thanks, Chris |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chip-
THANK YOU! Works like a charm. I appreciate it. -Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
make Cell blank | Excel Discussion (Misc queries) | |||
How do I make a blank cell with a date format blank? | Excel Worksheet Functions | |||
test for not blank, use value in cell and set as variable | Excel Discussion (Misc queries) | |||
Make a cell blank? | Excel Worksheet Functions | |||
how to sum numeric values of column (variable length) in 1st available blank cell | Excel Programming |