![]() |
Unhiding multiple rows simutaneously
I have the following (view code) macro that unhides/hides rows (one at a
time) in 2 worksheets depending on the User populating a certain range of cells: If Not Intersect(Target, Me.Range("F11:F14")) Is Nothing Then On Error Resume Next Application.ScreenUpdating = False Application.Calculation = xlCalculationAutomatic For Each c In Range("F12:F14") If c.Value = "" And c.Offset(0, 45) = 0 Then Sheets("WKLY-RPT").Unprotect ("lindAP") Sheets("EXP RPT").Unprotect ("lindAP") c.EntireRow.Hidden = True i = c.Row Sheets("WKLY-RPT").Rows(i).EntireRow.Hidden = True Sheets("WKLY-RPT").Protect ("lindAP") Sheets("EXP RPT").Protect ("lindAP") End If Next For Each c In Range("F11:F14") If c.Value < "" Then Sheets("WKLY-RPT").Unprotect ("lindAP") Sheets("EXP RPT").Unprotect ("lindAP") c.Offset(1, 0).EntireRow.Hidden = False i = c.Row Sheets("WKLY-RPT").Rows(i + 1).EntireRow.Hidden = False Sheets("WKLY-RPT").Protect ("lindAP") Sheets("EXP RPT").Protect ("lindAP") End If Next End If Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic End Sub Now, is it possible to incorporate another similar function that would also unhide/hide rows 102:105? If it helps, I've set-up rows 102:105 ("EXP RPT) to correspond with cells F11:F14, whereby a numeral "1" is automatically inserted into cells D102:D105" when cells F11:F14 are populated. Hope I didn't confuse anybody. |
All times are GMT +1. The time now is 12:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com