VBA to Delete Multiple Columns based on Headers - Excel VBA Macro Example

preview_player
Показать описание
This Tutorial explains Simple VBA Code to delete specific columns in Excel. We can use Columns Object of worksheet to delete entire column based on header. This example also covers how to delete blank columns and how to delete column based on criteria.
Рекомендации по теме
Комментарии
Автор

This is brilliant, thank you so much for posting this! I'm a VBA novice and have been trying to figure out how to set multiple if statements one after another.

princess_riee
Автор

Thank you, great tutorial and easy to follow.

tlee
Автор

Thank you very much for this simple and wonderful code.

MohAboAbdo
Автор

This is helpful, The only problem I found in this code is, If you have the same column header and they are placed next to each other then it will only delete the first one since the columns will move to left and the loop will proceed to the next column.

jaypeehernandez
Автор

Great stuff Sir, thanks for you help. I have just one question. It works well if you have specific value in single cell. It doesnt`t delete columns that are merged. Any advise ?

KeiKam
Автор

Can you use an “or” instead of writing code for both?

scottbennett
Автор

I have a separate table on a different worksheet, how can I refer to that to delete my columns? Do I need to set my table as an array first then reference to its individual cells for deleting my headers? Thanks

jmd.
Автор

Hi, thank you so much! this is very informative. Just a question how about if you wanted to delete multiple columns based on the cell value, say to delete columns with cell value greater than 50%. What could be the formula for this one? thanks in advance!

healingmusicofficial
Автор

Greetings, first of all, allow me to express my gratitude for your video, it was very helpfull. But... now I'm having an Issue where it is not deleting al of the Columns which I have Input (about 15 Columns). Or... do I need a different approach for so many Columns at once!?

thevetominator
Автор

Hi! How can i loop this macro onto other sheets? Thank you in advance :)

Nekomancerist
Автор

Hi, unable to delete multiple columns after using vba micros (as per video). How can i delete multiple columns in specific database.

gauravgfatm
Автор

hi, if we want to select and delete data between the rows, ( ex in my Qty colum, , if i want to remove the Qty=0/ nill i want to delete those rows data. can you pelase hep in VAB query for it

shabarilucky
Автор

If column number are changing then what code can be used? Please help

skhussain
Автор

Sir if we have to delete more than 20 columns then...wt will be the code

gayathrithakur
Автор

How to delete columns as per header value from multiple sheet using vba(same header value in all sheet)

heavenflora
Автор

What will be code in case if we want to delete data in 4th column, and let column to be exist

namratamaurya
Автор

How many columns we delete at time?
I have 323 columns with same name, i want to delete that columns at time, kindly assist. Or share is code for the same.

maheshpawar
Автор

Lebih baik jika di lampirkan file contohnya

IMANSHAPOORO