How to hide a cell if a formula returns no value?

B

bobbly_bob

HI again all,

what I'm after this time is a way to hide a cell by using a formula.
This is pretty much solely for formatting reasons so that the sheet can
be cut and paste into word from excel without empty cells coming up.

I need something like this;

cell a1 contains "whatever is entered into cell a1"
in cell a2 =IF(a1="",Hide cell a2,a1)

not an overly useful example I know, but hopefully you guys get the
jist of what I mean,

Cheers,
 
B

bobbly_bob

Yeah, I know how to hide a value and all, what I need is something like
this, sorry my example was a bit lacking

a1 contains "something"
a2 containt nothing
a3 contains "something"
a4 contains nothing
a5 contains nothing
a6 sontains "something"

now say in sheet 2 i have

=IF(sheet1!a1="something", Sheet1!a1,Hide row)
=IF(sheet1!a2="something", Sheet1!a2,Hide row)
=IF(sheet1!a3="something", Sheet1!a3,Hide row)
=IF(sheet1!a4="something", Sheet1!a4,Hide row)
=IF(sheet1!a5="something", Sheet1!a5,Hide row)
=IF(sheet1!a6="something", Sheet1!a6,Hide row)

so what sheet2 would show would be

something
something
something

with no blank rows / cells inbetween
 
D

Dave Peterson

Formulas can't hide rows.

Maybe you can apply Data|Filter|autofilter to hide the rows you want.
 
Top