IF statement

  • Thread starter Thread starter Yul
  • Start date Start date
Y

Yul

HI!

I have named a range of cells, e.g. K12:K14 to "Test". What I want t
do is to display the three cells named test based on a value in anothe
cell, in this case cell N12. If the value in N12 equals 1 then I wan
to display "Test" (ie three cells K12:K14) starting at cell e12.

Can this be done using an IF statement?

I have tried: IF(N12=1;Test;"") but this only displays the first cel
in the named range, ie cell K12!

How can this be solved?

Thanks in advance!
Rgds
Yu
 
Hi
You cannot dispaly a range of cells with the IF statement in the manner you
describe.
You can only display the contents of a single cell.
You would have to put the If statement in 3 separate cells, each of which
would need to be related to the single cell N12
In the first cell of the range where you want "Test" to appear, type
=IF($N$12=1;K12;"")
then copy down. As K12 is relative, it will change to K13 and K14 as you
copy down.
 
Ok, thanks!

What if I want to have more than one condition in the if statement,
i.e. if N12=1 display for example the content of K12 and if N12=2
display the content of K15 otherwise a blank cell

Some kind of nested if statement?

Rgds
Yul
 
Back
Top