Thread
:
find first cell not equal to current cell
View Single Post
#
2
Posted to microsoft.public.excel.programming
Gary L Brown
external usenet poster
Posts: 219
find first cell not equal to current cell
Yes, sounds good.
---------------------------------------------------------------
Dim i As Long
On Error GoTo exit_Sub
Do While True
i = i + 1
If ActiveCell.Offset(i, 0).Value < ActiveCell.Value Then
MsgBox "Next Value Cell: " & ActiveCell.Offset(i, 0).Address
Exit Do
End If
Loop
exit_Sub:
---------------------------------------------------------------
HTH,
--
Gary Brown
If this post was helpful, please click the ''''Yes'''' button next to
''''Was this Post Helpfull to you?".
"TommySzalapski" wrote:
What is the best way to find the next cell down in a column that does
not equal the current cell? Do I have to use a while loop?
while cells(i,2).value = oldCellValue
i = i+1
--
TommySzalapski
------------------------------------------------------------------------
TommySzalapski's Profile:
http://www.excelforum.com/member.php...o&userid=25561
View this thread:
http://www.excelforum.com/showthread...hreadid=392944
Reply With Quote
Gary L Brown
View Public Profile
Find all posts by Gary L Brown