What would the code be to delete a column if it contains a word such as "Time"? It can be any column.
What would the code be to delete a column if it contains a word such as "Time"? It can be any column.
You said A column, so I am assuming just one column? If so
Columns(Cells.Find("Time").Column).Delete
Hi,
I just need one column. It could be several but one will work. I can run the macro for several different columns. How can I specify a specific cell with a specific word to delete the column?
what do you mean? Can you post a sample workbook?
Columns(Cells.Find(Range("B2").Column).Delete
What I meant is that it needs to find the word "Time" in B2 and delete that column. If that word isn't in B2 then it should leave the column as it is.
If Range("B2").Value = "Time" Then Columns("B").Delete
Thanks JieJenn, exactly what I was looking for.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks