How to update table columns with a macro?

Viewed 27

I'm working on a macro and I need help because I really don't know how to make it.

Here's my situation.

In my Excel spreadsheet, I have several sheets, one sheet = one business, in each sheet there is one table. All tables are identical between the sheets. They have the same number of columns and the same headers. Only lines can be different.

My goal is to create a macro that checks the number of columns for each table. And if there is one table with one more column, I want the macro to update all the other tables and add the same column to the other tables at the same position.

However, I have no idea where to start.

I was thinking about using IF statements saying IF Table1 bigger than Table2 and Table3, then insert new column, etc. But I don't know if it will work.

Or maybe there is another way to do it that is way more simple but I just don't know it yet.

Thank you very much for your help!

0 Answers
Related