Using VBA to hide rows in Excel if a Value returns 0 -


i'm trying create automated proposal document, , when value returns 0 in spreadsheet, want hide bunch of extraneous rows/graphics in rows reduce clutter , make clean pdf send out.

private sub worksheet_change(byval target range)      if .range("f15").value = "0"         rows("7:25").entirerow.hidden = true     elseif range("f15").value       rows("7:25").entirerow.hidden = false     end if  end sub 

where should go here? if f15 returns value greater 0, wish rows shown.

try this, holp works

private sub worksheet_change(byval target range)      if .range("f15").value = "0"         rows("7:25").entirerow.hidden = true     else         rows("7:25").entirerow.hidden = false     end if  end sub 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -