Assume lease type is in Column E and the values start in row2
set rng = Range(cells(2,"E"),Cells(rows.count,"E").End(xlup) )
for each cell in rng
Select Case lcase(cell.Value)
Case "temporary"
' process a temporary lease
Case "permanent"
' process row as a permanent lease
Case "contingent"
' process row as a contingent less
CaseElse
cell.Select
msgbox "Lease type " & cell.Value & " is unknown"
End Select
Next
Assumes there are three types of leases "Temporary", "Permanent",
"Conditional" just for illustrative purposes, and that these are the string
values that would be found in column E.
--
Regards,
Tom Ogilvy
"acarril" wrote in message
...
thank you so much. I have one question: i have almost 5000 rows to run
through-is there a way to have it loop through based on the condition
"lease type"? you've been so helpful i hate to even ask but this is
way over my head.
--
acarril
------------------------------------------------------------------------
acarril's Profile:
http://www.excelforum.com/member.php...o&userid=10027
View this thread: http://www.excelforum.com/showthread...hreadid=262049