Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If "text" exists in COL A, keep (quick one)
Hello all
Here's the deal. If "Customer Name:" exists in COL A, keep the row. if "Customer Totals" exists in B, keep those rows too. Delete ALL the rest. "Customer Name:" and "Customer Totals" NEVE appear together on the same row. Here's what I've started with: Dim x As Long For x = 1 To Range("A65536").End(xlUp).Row If Range("A" & x) < "Customer Name:" Then Range("A" & x).EntireRow.Delete Else Range("A" & x).EntireRow.Delete End If Next Of course, this will delete the "Customer Totals" rows before th macro has time to KEEP those rows. Can someone help me merge this wit "keep COL B If Customer Totals exists?" Thanks for reading -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Text "comparison" operator for "contains" used in an "IF" Function | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
No "Sheet" tab exists on Page Layout. Need to print gridlines.??? | Excel Worksheet Functions | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) | |||
within a macro how can I suppress the warning pop "A file named xxxx.xls already exists in this location. Do you want to replace it?" | Excel Programming |