Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Delete Columns 19, 20 and 23 if Column 27 has "898" in cells

$
0
0

I want to delete Column S (19), T (20) and W (23) only if column AA1 (27) has the number "898" in the cells.

I have used code:

Sub sbVBS_To_Delete_FirstFewColumns_in_Excel()

   Columns(19).EntireColumn.Delete

   Columns(19).EntireColumn.Delete

   Columns(21).EntireColumn.Delete

End Sub

but don't know to how to wright the condition to run this if column AA1 has "898" in the cells.


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>