Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro
Hi All
I have a large financial spreadsheet that is sent to me from another source. I have written a macro to remove all unwanted data and make a summarized printout. However, each month the spreadsheet gets one column wider due to the extra month. How can I rewrite my macro so that it hides this extra month when it runs. eg, My macro hides columns C to G, next month it will have to hide C to H, etc, etc. Hope you can help Regards Michael |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro
Michael,
Try something like Range(Range("A1"), Cells(1, Columns.Count).End(xlToLeft)(1, 0)) _ .EntireColumn.Hidden = True -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Michael" wrote in message ... Hi All I have a large financial spreadsheet that is sent to me from another source. I have written a macro to remove all unwanted data and make a summarized printout. However, each month the spreadsheet gets one column wider due to the extra month. How can I rewrite my macro so that it hides this extra month when it runs. eg, My macro hides columns C to G, next month it will have to hide C to H, etc, etc. Hope you can help Regards Michael |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro
Thanks Chip
Can you explain how this function works. I am not aware of some of these commands The extra column each month will always be the second last column, if that makes any difference. Regards Michael *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |