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
Post a Comment