How do I add an extra column to this "IF" formula?

Marq

Well-known Member
Joined
Dec 13, 2004
Messages
914
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Here is my current working formula: =IF(AG3="<NONE>","Unit Rate","T&M")

What it is telling me is if any cell in AG has <NONE> in the cell, then give me a result of Unit Rate.....but if anything other than <NONE> is in the cell then give me the result of T&M.

It works accordingly.....but now I want to include 2 other columns into the formula and I don't know how to do it.

the columns being used:

AC = this is the column the formula is in
AG =cells will be populated with either <NONE> or one of a hundred different PO numbers
X = cells will be populated with either 001 Mechanic or 002 Builder
BC = cells will have the location code of either Z001 or Z002 (Z001 means Building 1 and Z002 means Building 2)

These are the results I need to show up in the formulated cell in AC using a combination of AG, X and BC:

Unit Rate Mechanic Building 1
Unit Rate Mechanic Building 2
T&M Mechanic Building 1
T&M Mechanic Building 2
Unit Rate Builder Building 1
Unit Rate Builder Building 2
T&M Builder Building 1
T&M Builder Building 2

Can someone please help me out with completing what I already started?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
I think this works (for AC3):

Excel Formula:
=IF(AG3="<NONE>","Unit Rate","T&M")&" "&IF(X3="001","Mechanic","Builder")&" "&IF(BC3="Z001","Building 1","Building 2")
 
Upvote 0
Solution
I think this works (for AC3):

Excel Formula:
=IF(AG3="<NONE>","Unit Rate","T&M")&" "&IF(X3="001","Mechanic","Builder")&" "&IF(BC3="Z001","Building 1","Building 2")
I had to change one part of it. I made it show as:

Excel Formula:
=IF(AG3="<NONE>","Unit Rate","T&M")&" "&IF(X3="001 Mechanic","Builder")&" "&IF(BC3="Z001","Building 1","Building 2")

You had the "001", "Mechanic" in separate quotes....it should be in the same quotes.

I made that one minor edit and it works perfect! Thank you!
 
Last edited by a moderator:
Upvote 0
Excel Formula:
=IF(AG3="<NONE>","Unit Rate","T&M")&" "&IF(X3="001 Mechanic","Builder")&" "&IF(BC3="Z001","Building 1","Building 2")

IF(X3="001 Mechanic","Builder") returns false if X3=002 Builder since there is no false condition value in the formula. So you need the following instead:

Excel Formula:
=IF(AG3="<NONE>","Unit Rate","T&M")&" "&IF(X3="001 Mechanic", "001 Mechanic", "002 Builder")&" "&IF(BC3="Z001","Building 1","Building 2")

I can see that @maabadi also though that X3 contains only 001 or 002 just like I did. So I am switching the solution post accordingly.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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