View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
stew0720 stew0720 is offline
external usenet poster
 
Posts: 1
Default find the next empty cell: expanded


I'm trying to tell good 'ole Excel to start at B3, then go down the
column and find the next row with the value of "Address" in column B
WITH an empty cell next to it in Column C. In other words, I've got a
data entry userform, and I'm trying to located the next empty form
(they all start with "Address").

I'm aware that the following code will find the next empty cell:

Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True


So I'm trying to do something like this:

If ActiveCell = "Address" And ActiveCell.Offset(0, 1) Is Not Null Then
ActiveCell.Offset(1, 0).Select
End If
ActiveCell = "Address" And ActiveCell.Offset(0, 1) Is Null

But that's nowhere near correct i guess. Any ideas?


--
stew0720
------------------------------------------------------------------------
stew0720's Profile: http://www.excelforum.com/member.php...o&userid=35687
View this thread: http://www.excelforum.com/showthread...hreadid=554741