Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default hiding unused rows using macros

Hi all,

I'm having an issue making a macro to hide all unused rows from the
very last row possible to the last row with data in it. This is to be
used with imported data that will not be the same size every time its
imported. Can anyone help me?

-Cindy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default hiding unused rows using macros

On 28 Nov, 22:48, wrote:
Hi all,

I'm having an issue making a macro to hide all unused rows from the
very last row possible to the last row with data in it. This is to be
used with imported data that will not be the same size every time its
imported. Can anyone help me?

-Cindy


Here is an example of code:

Sub HideUnusedRows
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default hiding unused rows using macros

On 28 Nov, 22:48, wrote:
Hi all,

I'm having an issue making a macro to hide all unused rows from the
very last row possible to the last row with data in it. This is to be
used with imported data that will not be the same size every time its
imported. Can anyone help me?

-Cindy


Here is an example of code that should do what you need:

Sub HideUnusedCode:

Range("A" & Cells(65536,1).end(xlup).row & ":A65536).entirerow.hidden
= true

End Sub

James
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default hiding unused rows using macros

On 28 Nov, 23:08, wrote:
On 28 Nov, 22:48, wrote:

Hi all,


I'm having an issue making a macro to hide all unused rows from the
very last row possible to the last row with data in it. This is to be
used with imported data that will not be the same size every time its
imported. Can anyone help me?


-Cindy


Here is an example of code that should do what you need:

Sub HideUnusedCode:

Range("A" & Cells(65536,1).end(xlup).row & ":A65536).entirerow.hidden
= true

End Sub

James


Third time lucky:

Sub HideUnusedCode:

Range("A" & Cells(65536,1).end(xlup).row &
":A65536").entirerow.hidden
= true

End Sub

This will be correct for all versions of Excel except Excel 2007, post
back if you will be using that version.

James
Reply
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
hiding unused categories in charts Compensation Analyst Excel Discussion (Misc queries) 1 March 19th 07 09:22 PM
Hiding Unused Rows [email protected] Excel Programming 1 January 19th 07 10:40 PM
Hiding unused rows [email protected] Excel Programming 1 January 17th 07 08:22 PM
Hiding unused columns Darin Kramer Excel Programming 3 September 15th 06 12:27 PM
Having a floating row or hiding unused rows? Simon Lloyd[_764_] Excel Programming 5 June 14th 06 09:45 PM


All times are GMT +1. The time now is 02:15 PM.

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

About Us

"It's about Microsoft Excel"