Hi Everyone,
I'm having a truoble to solve my below problem. I need your advise.
I have a table like below first rows as header. And what I want to do is create a macro that helps me to find columns doesn't match my conditions and to be deleted. But my below code doesn't work. Aren't we allowed to use multiple Or statement ? Thanks in advance for your help.
I'm having a truoble to solve my below problem. I need your advise.
I have a table like below first rows as header. And what I want to do is create a macro that helps me to find columns doesn't match my conditions and to be deleted. But my below code doesn't work. Aren't we allowed to use multiple Or statement ? Thanks in advance for your help.
A1 | B1 | C1 |
Müşteri Adı | 20 | Name |
VBA Code:
Dim i as integer
For i = 1 To 30
If Range("A1").Offset(0, i).Value <> "Müşteri Adı" Or "20" Or "40" Or "TR." Or "S. Liman" Or "T.Kilo" Then
Columns(i + 1).Delete
End If
Next i