Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default hide rows with macro

I want makro which can find out which cells are empty in area a12:a35 and
hide those rows where cells are empty.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 222
Default hide rows with macro

"Alen32" wrote:

I want makro which can find out which cells are empty in area a12:a35 and
hide those rows where cells are empty.



One way:-

Sub HideRows()
For a = 12 To 35
If Cells(a, 1) = "" Then
Cells(a, 1).Select
Selection.EntireRow.Hidden = True
End If
Next a
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default hide rows with macro

doesn't work.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 222
Default hide rows with macro

"Alen32" wrote:

doesn't work.


Should do. I trust you copied the lines into a new module
( Alt+F11InsertModule )
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default hide rows with macro

it works in some sheets but dosn't work in some others sheets. I don't know
why



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 222
Default hide rows with macro

Depends on whether the cells are empty or contain a space, I guess
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default hide rows with macro

thanks!

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
Macro code to hide rows and not calculate hidden rows bradmcq Excel Discussion (Misc queries) 0 September 1st 09 12:38 AM
Macro to hide rows lightbulb Excel Discussion (Misc queries) 4 July 11th 08 06:13 PM
hide rows with macro Macro to hide rows in spreadwsheet Excel Discussion (Misc queries) 3 May 12th 05 05:02 PM
macro to hide rows david Excel Discussion (Misc queries) 3 April 8th 05 03:25 PM
Macro to hide rows. Steve Excel Programming 4 January 25th 04 08:46 PM


All times are GMT +1. The time now is 12:18 PM.

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"