WHich formula?

T

the dave

Thanks in advance.
Which formula would work here?
I have 7 cells. In one random cell there is a random text value. I want the
text value from whichever cell it is in, to show up in my main cell where I
need the formula.
 
A

Arvi Laanemets

Hi

When all other cells are always empty, then something like
=A1 & B1 & C1 & D1 & E1 & F1 & G1


Arvi Laanemets
 
J

JLatham

Sounds like a job for SuperIF -- this formula will examine 7 different cells,
change as required, and will put the contents of the first one with something
in it into the cell with the formula.
=IF(B1<>"",B1,IF(C1<>"",C1,IF(D1<>"",D1,IF(E1<>"",E1,IF(F1<>"",F1,IF(G1<>"",G1,IF(H1<>"",H1,"")))))))

If the cell to have the formula is one of the 7 you mention, then this is a
6-IF solution
=IF(B1<>"",B1,IF(C1<>"",C1,IF(D1<>"",D1,IF(E1<>"",E1,IF(F1<>"",F1,IF(G1<>"",G1,""))))))
 
G

Gary''s Student

This is an interesting question. Let's say that A1 thru G1 are all empty
except one. We want a formula to return the value in that single non-empty
cell:

=A1&B1&C1&D1&E1&F1&G1
 
T

Teethless mama

Try this:

=INDEX(A1:G1,MATCH(TRUE,A1:G1<>"",A1:G1))

ctrl+shift+enter, not just enter
 
Top