Is this what you mean?
F3, copied down:
=IF(ISNUMBER(MATCH(1,B3:E3,0)),INDEX($B$2:$E$2,MAT CH(1,B3:E3,0)),"")
G3, confirmed with CONTROL+SHIFT+ENTER, and copied down:
=IF(COUNTIF(B3:E3,1)1,INDEX($B$2:$E$2,SMALL(IF(B3 :E3=1,COLUMN($B$2:$E$2)
-COLUMN($B$2)+1),2)),"")
--
Domenic
Microsoft Excel MVP
www.xl-central.com
Your Quick Reference to Excel Solutions
In article
,
Redi wrote:
Hi all,
here is the layout of my spreadsheet:
a3=apple
a4=orange
a5=pear
b2=red
c2=green
d2=yellow
e2=blue
b3=1
c4=1
d5=1
e5=1
f3=formula
f4=formula
f5=formula
g3=formula
g4=formula
f4=formula
column f formula: if there is a 1 on b3:e3, give me the color text
column g formula: if there is another 1 on b3:e3, give me the next
color text
thank you in advance!