ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Fixed 26 million rows, now 16,000 columns- help help! (https://www.excelbanter.com/excel-discussion-misc-queries/152373-fixed-26-million-rows-now-16-000-columns-help-help.html)

The BusyHighLighter[_2_]

Fixed 26 million rows, now 16,000 columns- help help!
 
I posted earlier about having 26 mil rows and an inability to sort. I have
gotten the row problem fixed. Now I see that I have 16,000+ columns.

How can I get rid of these?



Chip Pearson

Fixed 26 million rows, now 16,000 columns- help help!
 
If you know the last column that contains real data, use code like

Sub AAA()
Dim N As Long
Const LAST_COLUMN_WITH_REAL_DATA = 20

With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
For N = LAST_COLUMN_WITH_REAL_DATA To Columns.Count
Columns(LAST_COLUMN_WITH_REAL_DATA + 1).Delete
Next N
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
End With
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"The BusyHighLighter" wrote
in message ...
I posted earlier about having 26 mil rows and an inability to sort. I have
gotten the row problem fixed. Now I see that I have 16,000+ columns.

How can I get rid of these?




JLatham

Fixed 26 million rows, now 16,000 columns- help help!
 
Chip,
He's got the last column (S) - he had a 2007 file go south on him, reporting
he had over 24M rows when he really only had 700 or so. See this discussion
for that background if you need it:
http://www.microsoft.com/office/comm...0-221433f2f12d

Hey, BusyHighlighter ... did you get rid of all those zeros? I posted where
to find the setting in that other discussion, referenced above.

"Chip Pearson" wrote:

If you know the last column that contains real data, use code like

Sub AAA()
Dim N As Long
Const LAST_COLUMN_WITH_REAL_DATA = 20

With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
For N = LAST_COLUMN_WITH_REAL_DATA To Columns.Count
Columns(LAST_COLUMN_WITH_REAL_DATA + 1).Delete
Next N
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
End With
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"The BusyHighLighter" wrote
in message ...
I posted earlier about having 26 mil rows and an inability to sort. I have
gotten the row problem fixed. Now I see that I have 16,000+ columns.

How can I get rid of these?





All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com