LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Delete Blank Columns

I have a spreadsheet with some basic column headers in row 1 and data in some
cells below the headers (range is actually flexible). After I divide up the
data into different worksheets, many of the columns are left blank except for
the headers and I'm looking for a way to search the range (A1-Z60), find the
empty columns, and delete them. For example, I'd want to delete columns "B"
and "D" in the following table as they only have the headers in Row1 with no
data below.

A B C D
1 H1 H2 H3 H4
2 1 2
3 33 44

I have found lots of references to deleting empty rows, but not columns. I
was able to find a way to hide empty column (from one of the great
programmers that post help for us beginners) and this works great, but I have
another macro that formats the header colmun which then unhides the empty
columns, so I really need to just delete them.

Any help would be appreciated.

BSII (Michael Lindauer)

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete blank columns Johannes_R Excel Worksheet Functions 2 April 7th 09 07:33 PM
Delete blank columns. John Excel Discussion (Misc queries) 7 November 29th 07 10:48 PM
Delete rows with certain columns blank Slohcin Excel Discussion (Misc queries) 2 November 1st 06 02:35 PM
delete non adjacent columns when blank Mona Excel Programming 4 August 31st 06 01:30 AM
Delete rows that contain blank columns Lindsey Excel Worksheet Functions 1 December 8th 05 10:34 PM


All times are GMT +1. The time now is 11:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"