Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Syntax Recognition

Status
Not open for further replies.

Bass71

MIS
Jun 21, 2001
79
I am in Excel and I am trying to write an IF Then that scans through a row and seeks the text <> written exactly like that, <>. I then need to delete that column. However, when I write:


If ActiveCell.Value = &quot;<>&quot; Then
Columns.Select
Selection.Delete Shift:=xlToLeft
Else: ActiveCell.Offset(0, 1).Select
End If

Excel thinks I am asking for a non null condition, even though I have enclosed them in quotes. What ends up happening is that it deletes every populated column in my sheet......

What to do??????????????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top