Excel hide/show rows worksheet_change not working when cell value deleted -


firstly apologies i'm complete novice this. i'm helping our hr department develop training spreadsheet , wanted include code hides rows when no training needs flagged done numerical value i.e. 9 or 10. i've got functionality work when 'delete' cell value doesn't trigger change event i.e. hiding row.

i'm sure simple solution not 1 i've been able conclude based on existing posts.

would appreciate anyone's on this

thank-you

matt

private sub worksheet_change(byval target range)  on error goto reset_enableevents application.enableevents = false  if target.address = "$o$4" if isnumeric(target.value) if target.value >= 1 , target.value <= 8 sheets("training plan").rows("5:21").entirerow.hidden = false else if target.value < 11 , target.value >= 9 sheets("training plan").rows("5:21").entirerow.hidden = true end if end if end if end if  if target.address = "$o$5" if isnumeric(target.value) if target.value < 11 , target.value >= 9 sheets("training plan").rows("23:40").entirerow.hidden = true else if target.value >= 1 , target.value <= 8 sheets("training plan").rows("23:40").entirerow.hidden = false end if end if end if end if   if target.address = "$o$6" if isnumeric(target.value) if target.value < 11 , target.value >= 9 sheets("training plan").rows("41:59").entirerow.hidden = true else if target.value >= 1 , target.value <= 8 sheets("training plan").rows("41:59").entirerow.hidden = false end if end if end if end if  if target.address = "$o$7" if isnumeric(target.value) if target.value < 11 , target.value >= 9 sheets("training plan").rows("60:77").entirerow.hidden = true else if target.value >= 1 , target.value <= 8 sheets("training plan").rows("60:77").entirerow.hidden = false end if end if end if end if  if target.address = "$o$8" if isnumeric(target.value) if target.value < 11 , target.value >= 9 sheets("training plan").rows("78:95").entirerow.hidden = true else if target.value >= 1 , target.value <= 8 sheets("training plan").rows("78:95").entirerow.hidden = false end if end if end if end if  if target.address = "$o$9" if isnumeric(target.value) if target.value < 11 , target.value >= 9 sheets("training plan").rows("96:113").entirerow.hidden = true else if target.value >= 1 , target.value <= 8 sheets("training plan").rows("96:113").entirerow.hidden = false end if end if end if end if  reset_enableevents: application.enableevents = true end sub 


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -