bobkap
Active Member
- Joined
- Nov 22, 2009
- Messages
- 323
- Office Version
- 365
- Platform
- Windows
- Mobile
- Web
I am trying to delete columns if the header of the column is NOT a header containing the word "Transaction Status" and other headers, but when I run this (below) it doesn't delete columns based on these criteria. It deletes every column.
Any help on what I'm doing wrong would be greatly appreciated.
If Cells(1, counter) <> "Transaction Status" Or Cells(1, counter) <> "Settlement Amount" Or Cells(1, counter) <> "Settlement Date/Time" Or Cells(1, counter) <> "Submit Date/Time" Or Cells(1, counter) <> "Date" Then
Columns(counter).Delete
Any help on what I'm doing wrong would be greatly appreciated.
If Cells(1, counter) <> "Transaction Status" Or Cells(1, counter) <> "Settlement Amount" Or Cells(1, counter) <> "Settlement Date/Time" Or Cells(1, counter) <> "Submit Date/Time" Or Cells(1, counter) <> "Date" Then
Columns(counter).Delete