View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
aapp81[_18_] aapp81[_18_] is offline
external usenet poster
 
Posts: 1
Default Help, i can't figure out 2 "And" operators!


this works:

its what i had originally except "Customer R..." is not "cu... r...
and i left "[NULL]" as UCase and put the offset to 4...
other than that, everything was fine in my original code.

thanks for everyone's help!

Sub DelRowOn_ColsBCFmain()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim cell As Range, rng As Range, i As Long
Set rng = Columns("B").SpecialCells(xlConstants, xlTextValues)
For i = rng.Count To 1 Step -1
If LCase(rng(i).Value) = "customer relations" _
And UCase(rng(i).Offset(0, 1).Value) = "[NULL]" _
And UCase(rng(i).Offset(0, 4).Value) = "[NULL]" _
Then rng(i).EntireRow.Delete
Next i
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Su

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements