View Single Post
 
Old 08-05-2014, 10:26 AM
Faugs Faugs is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Aug 2014
Posts: 5
Faugs is on a distinguished road
Smile Creating VBA Code to Delete Empty Column in Table

Hi all,

I've been stuck on this for very long and would appreciate any help whatsoever!

I've created a mail merge that populates a table in Word. The table will be populated with the account's sales for 1 of 6 eligible product groups (see below)


However, if the account has no sales for a specific product group (Mobile PC - Column 2), then some of the cells are left blank (see below).


I'd like to create a VBA code that would detect if any cells are blank within the table and if so, delete the entire column (see final result below, Mobile PC column is deleted).


I have been deleting each column manually in the past, but have now been tasked with completing these letters once a week. We have thousands of accounts which means I have to manually delete thousands of columns each week.

Any help would be so appreciated, thank you!
Attached Images
File Type: jpg 1.JPG (60.5 KB, 55 views)
File Type: jpg 2.JPG (57.4 KB, 54 views)
File Type: jpg 3.JPG (52.6 KB, 54 views)
Reply With Quote