If, VLookup, Index, or a combination of all of them?
If there is no 1, for example, in a row,
I'd like the returned value to be 0
Do you mean just plain old 0 or 07.0 ?
For plain old 0:
=IF(COUNTIF(A2:D2,1)=0,0,"07."&IF(A2=1,1,"")&IF(B2 =1,2,"")&IF(C2=1,3,"")&IF(D2=1,4,""))
For 07.0:
="07."&IF(COUNTIF(A2:D2,1)=0,0,"")&IF(A2=1,1,"")&I F(B2=1,2,"")&IF(C2=1,3,"")&IF(D2=1,4,"")
--
Biff
Microsoft Excel MVP
"LisaM" wrote in message
...
"T. Valko" wrote:
What result do you want if no cells contain 1?
If there is no 1, for example, in a row, I'd like the returned value to be
0
(zero).
Try something like this:
="07."&IF(A2=1,1,"")&IF(B2=1,2,"")&IF(C2=1,3,"")&I F(D2=1,4,"")
--
Biff
Microsoft Excel MVP
This works perfect! And it was so simple!!
Thank you very much for your help. :)
|