Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Sonia
 
Posts: n/a
Default hiding rows with a formula

I have a form that I have created in excel and I want to know how to hide
rows automatically, that do not have data in them, with a formula. The form
pulls information from other sheets.
  #2   Report Post  
Posted to microsoft.public.excel.misc
David Billigmeier
 
Posts: n/a
Default hiding rows with a formula

Select the range of cells you want to check, and run this macro:

Sub HideRows()
Dim rn As Range
Dim rng As Range
Set rng = Selection
For Each rn In rng.Cells
If (rn.Value = "") Then
Rows(rn.Row).Hidden = True
End If
Next
End Sub


--
Regards,
Dave


"Sonia" wrote:

I have a form that I have created in excel and I want to know how to hide
rows automatically, that do not have data in them, with a formula. The form
pulls information from other sheets.

  #3   Report Post  
Posted to microsoft.public.excel.misc
Sonia
 
Posts: n/a
Default hiding rows with a formula

I have never used macros, how do I do it?

"David Billigmeier" wrote:

Select the range of cells you want to check, and run this macro:

Sub HideRows()
Dim rn As Range
Dim rng As Range
Set rng = Selection
For Each rn In rng.Cells
If (rn.Value = "") Then
Rows(rn.Row).Hidden = True
End If
Next
End Sub


--
Regards,
Dave


"Sonia" wrote:

I have a form that I have created in excel and I want to know how to hide
rows automatically, that do not have data in them, with a formula. The form
pulls information from other sheets.

  #4   Report Post  
Posted to microsoft.public.excel.misc
David Billigmeier
 
Posts: n/a
Default hiding rows with a formula

First, right click on the tab of the worksheet that has the rows you want
hidden and choose "View Code" (you can also hit Alt+F11 and double click your
sheet name). This will open up the VBA window.

Second, just paste in the code.

Third, from your worksheet, hit Alt+F8, click on the "HideRows" macro, and
hit run

Does that help?
--
Regards,
Dave


"Sonia" wrote:

I have never used macros, how do I do it?

"David Billigmeier" wrote:

Select the range of cells you want to check, and run this macro:

Sub HideRows()
Dim rn As Range
Dim rng As Range
Set rng = Selection
For Each rn In rng.Cells
If (rn.Value = "") Then
Rows(rn.Row).Hidden = True
End If
Next
End Sub


--
Regards,
Dave


"Sonia" wrote:

I have a form that I have created in excel and I want to know how to hide
rows automatically, that do not have data in them, with a formula. The form
pulls information from other sheets.

  #5   Report Post  
Posted to microsoft.public.excel.misc
Sonia
 
Posts: n/a
Default hiding rows with a formula

Yes, I figure it out, but it is really slow, the whole screen goes crazy.

I was kind of hoping there was a way it would do it with out me having to
press Alt+f11. I want to be able to go in and if the rows pull data they
will open up and close on there own if there isn't data. Any such thing?

"David Billigmeier" wrote:

First, right click on the tab of the worksheet that has the rows you want
hidden and choose "View Code" (you can also hit Alt+F11 and double click your
sheet name). This will open up the VBA window.

Second, just paste in the code.

Third, from your worksheet, hit Alt+F8, click on the "HideRows" macro, and
hit run

Does that help?
--
Regards,
Dave


"Sonia" wrote:

I have never used macros, how do I do it?

"David Billigmeier" wrote:

Select the range of cells you want to check, and run this macro:

Sub HideRows()
Dim rn As Range
Dim rng As Range
Set rng = Selection
For Each rn In rng.Cells
If (rn.Value = "") Then
Rows(rn.Row).Hidden = True
End If
Next
End Sub


--
Regards,
Dave


"Sonia" wrote:

I have a form that I have created in excel and I want to know how to hide
rows automatically, that do not have data in them, with a formula. The form
pulls information from other sheets.



  #6   Report Post  
Posted to microsoft.public.excel.misc
David Billigmeier
 
Posts: n/a
Default hiding rows with a formula

Might want to try the auto filter then... Data-Filter-Auto Filter. With
each re-pull of the data choose "NonBlanks" from the header drop down list.

--
Regards,
Dave


"Sonia" wrote:

Yes, I figure it out, but it is really slow, the whole screen goes crazy.

I was kind of hoping there was a way it would do it with out me having to
press Alt+f11. I want to be able to go in and if the rows pull data they
will open up and close on there own if there isn't data. Any such thing?

"David Billigmeier" wrote:

First, right click on the tab of the worksheet that has the rows you want
hidden and choose "View Code" (you can also hit Alt+F11 and double click your
sheet name). This will open up the VBA window.

Second, just paste in the code.

Third, from your worksheet, hit Alt+F8, click on the "HideRows" macro, and
hit run

Does that help?
--
Regards,
Dave


"Sonia" wrote:

I have never used macros, how do I do it?

"David Billigmeier" wrote:

Select the range of cells you want to check, and run this macro:

Sub HideRows()
Dim rn As Range
Dim rng As Range
Set rng = Selection
For Each rn In rng.Cells
If (rn.Value = "") Then
Rows(rn.Row).Hidden = True
End If
Next
End Sub


--
Regards,
Dave


"Sonia" wrote:

I have a form that I have created in excel and I want to know how to hide
rows automatically, that do not have data in them, with a formula. The form
pulls information from other sheets.

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
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
formula to use when number of rows changes dynamically confused Excel Worksheet Functions 3 August 17th 05 03:55 PM
Hiding rows from a formula Billsc Excel Worksheet Functions 2 July 6th 05 10:18 PM
HIDING ROWS IN PROTECTED WORKSHEETS kyoung Excel Discussion (Misc queries) 2 June 9th 05 05:17 AM
Insert rows, keep a formula? tb Excel Worksheet Functions 1 April 23rd 05 03:41 PM


All times are GMT +1. The time now is 01:40 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"