Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Columns with header in row 1 but no data in remainder of co
How do I Remove Columns with header in row 1 but no data in remainder of
column? I am using exported template spreadsheets that provide the header row ready for data import to the spreadsheet then using this to do bulk import to SQL database, but need to remove the blank columns were there is no data below the header en mass. Can anyone give me tips on how this could be done either using vb code or macros. Thanking you in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Remove Columns with header in row 1 but no data in remainder ofco
Change the numbers if Excel 2007.
Sub Macro1() Dim iCol As Integer Dim iRow As Long For iCol = 256 To 1 Step -1 iRow = Cells(65536, iCol).End(xlUp).Row If iRow = 1 Then Columns(iCol).Delete Next iCol End Sub Hth, Merjet |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to print one header over several columns of data | Excel Discussion (Misc queries) | |||
How do I remove the header from only one page? | Setting up and Configuration of Excel | |||
How can I remove a header in a Spreadsheet | Excel Discussion (Misc queries) | |||
ALLOW ROW 1 AS HEADER ROW... NOT PART OF DATA SORT OF ANY COLUMNS. | New Users to Excel | |||
Remove Email address header | Excel Discussion (Misc queries) |