Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find First Cell without a Certain Value
This code works fine, I just wanted to put this out there to see what other
people use. Is there a faster more efficient way to return the row number of the first row that does not contain "Archive" or "Ready" in Col.M? ' find first row without Archive or Ready lngFirstRow = 3 Do While .Cells(lngFirstRow, "M") = "Archive" Or .Cells(lngFirstRow, "M") = "Ready" lngFirstRow = lngFirstRow + 1 Loop -- Cheers, Ryan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find First Cell without a Certain Value
I don't know if this is faster, but it is another way to loop through and
find the cell. For Each c In Range("M2:M" & Cells(Rows.Count, 13). _ End(xlUp).Row) If c.Value < "Archive" And c.Value < "Ready" Then fRng = c.Address MsgBox c.Address Exit For End If Next "RyanH" wrote: This code works fine, I just wanted to put this out there to see what other people use. Is there a faster more efficient way to return the row number of the first row that does not contain "Archive" or "Ready" in Col.M? ' find first row without Archive or Ready lngFirstRow = 3 Do While .Cells(lngFirstRow, "M") = "Archive" Or .Cells(lngFirstRow, "M") = "Ready" lngFirstRow = lngFirstRow + 1 Loop -- Cheers, Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and Replace - delete the remainder of the text in the cell after my Find | Excel Programming | |||
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON | Excel Programming | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
UDF code to find specific text in cell comments, then average cell values | Excel Programming | |||
use find twice to find cell on a specific row | Excel Programming |