Hide and Unhide the rows if the formula result is ""

Malhotra Rahul

Board Regular
Joined
Nov 10, 2017
Messages
92
Hi, May i get help on VBA script to hide and unhide the rows if the formula result is "" in Summary worksheet from Range cell B17:B240. So by pressing the button it should hide the blank rows with unhide if the cell value range from B17:B240 not equal to "".
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Code:
Public Sub HideUnhide()
Dim iRows As Long, r As Long


Range("B17").Select
iRows = ActiveSheet.UsedRange.Rows.Count
For r = 17 To iRows
   Rows(r & ":" & r).EntireRow.Hidden = ActiveCell.Value = ""
Next
End Sub
 
Last edited:
Upvote 0
I have used the formula from cell B17 to B240 in the Summary Sheet. if the match not found then the cell value would be "" and if the matches found then accordingly the results have been displayed. Accordingly i need VBA script.
 
Upvote 0

Forum statistics

Threads
1,215,606
Messages
6,125,805
Members
449,262
Latest member
hideto94

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top