Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Make Variable Cell that is Blank?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Make Variable Cell that is Blank?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Make Variable Cell that is Blank?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Make Variable Cell that is Blank?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Make Variable Cell that is Blank?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Make Variable Cell that is Blank?

Chip-

THANK YOU! Works like a charm.

I appreciate it.

-Chris

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
make Cell blank superkopite Excel Discussion (Misc queries) 3 January 27th 06 07:41 AM
How do I make a blank cell with a date format blank? Pivot Table/Query Excel Worksheet Functions 6 June 14th 05 11:19 PM
test for not blank, use value in cell and set as variable Robert Excel Discussion (Misc queries) 0 March 24th 05 11:25 PM
Make a cell blank? Matthew Leingang Excel Worksheet Functions 1 November 23rd 04 04:54 PM
how to sum numeric values of column (variable length) in 1st available blank cell grimjim Excel Programming 1 October 18th 04 09:54 PM


All times are GMT +1. The time now is 06:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"