Automatically Hide rows on Sheet 2 conditional to data on Sheet 1

Ctralha

New Member
Joined
Nov 27, 2019
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hi, I'm trying to hide rows on an excel worksheet ("ERRORS") based on whether or not a specific cell of another worksheet ("WORKFLOW") is empty. i.e.: If cell I2 of worksheet ("WORKFLOW") has any value (if it is not empty) , row 2 on worksheet ("ERRORS") should be visible. If it has no value (is empty), row 2 on worksheet ("ERRORS") should be hidden. The code should repeat itself, so that row 5 depends on I5, row 6 on I6 and so on.

I would like the rows to be visible/hidden automatically as information is added to worksheet ("WORKFLOW".

Thank you in advance for the assistance!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Maybe something like this, pasted into the WORKFLOW sheet module

VBA Code:
Private Sub Worksheet_change(ByVal Target As Range)
If Intersect(Target, Range("I:I")) Is Nothing Then Exit Sub
If Target.Value = "" Then
Sheets("ERRORS").Rows(Target.Row).EntireRow.Hidden = True
Else
Sheets("ERRORS").Rows(Target.Row).EntireRow.Hidden = False
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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