Multiple If Statement to check for Value?

Justlikebrianw

Board Regular
Joined
Dec 9, 2015
Messages
52
I have 14 column headers in row B

Under each column header I have an X under them, or blank

How do I concatenate in a cell using an If statement? I am currently getting an error right now

=IF(EF3 = "X", EF2, ""), IF(EG3 = "X", EG2, "") etc..

After the second IF STATEMENT I get an error?

How can I do this?

Thanks
 
Thanks so much you too..

Thanks for the Trim Function and the recommendation to space out my headers in the R column.

Is there any way to essentially make it so column R is not just spaced out, but separated so that I could create a drop down list? So per the example above it would be as such in the R cell?

Food 2
Food 5
Food 9
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Do you mean like this?


Excel 2012
ABCDEFGHIJKLMNOPQR
1NameFood 1Food 2Food 3Food 4Food 5Food 6Food 7Food 8Food 9Food 10Food 11Food 12Food 13Food 14Food 15Food 16Order
2AlanXXXFood 2 Food 5 Food 9
3BrianXXX
4CharlieXXXX
5DaveXXXX
6EricXXXX
7FrankXXXX
8GeorgeXXXX
9HughXXX
Sheet1
Cell Formulas
RangeFormula
R2=IF(B2="X",B$1&CHAR(10),"")&IF(C2="X",C$1&CHAR(10),"")&IF(D2="X",D$1&CHAR(10),"")&IF(E2="X",E$1&CHAR(10),"")&IF(F2="X",F$1&CHAR(10),"")&IF(G2="X",G$1&CHAR(10),"")&IF(H2="X",H$1&CHAR(10),"")&IF(I2="X",I$1&CHAR(10),"")&IF(J2="X",J$1&CHAR(10),"")&IF(K2="X",K$1&CHAR(10),"")&IF(L2="X",L$1&CHAR(10),"")&IF(M2="X",M$1&CHAR(10),"")&IF(N2="X",N$1&CHAR(10),"")&IF(O2="X",O$1&CHAR(10),"")&IF(P2="X",P$1&CHAR(10),"")&IF(Q2="X",Q$1&CHAR(10),"")
 
Upvote 0
As a quick addendum, if you want Airfix's formula to work you will need the output cell to be formatted with the "Wrap Text" option. This can be found on the Home tab above "Merge and Centre" and to the right of the text formatting section (or tap the Alt key, then type H then W).
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,433
Members
448,897
Latest member
ksjohnson1970

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top