Nested if statements that's killing me

gigimarga

New Member
Joined
Oct 25, 2010
Messages
18
Office Version
  1. 2016
I have a column for base cost (dollars).

A second column has values of "Yes" or "No", where "Yes" has a value of $3 and "No" has no value.

A third column has values of "Yes" or "No" , where "Yes" has a value of $2 and "No" has no value.

In the fourth column I have to calculate the total cost based on columns 1, 2, and 3.

So for record 1 I have $18 (cost), followed by a "Yes" (which is $3), followed by a "No". In this case the Total Cost is $21.

Please help!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I don't think you need to use nested If's. If I'm reading this right, it would be simpler to do something like this:
Code:
=IF(B2="yes",3,0)+IF(C2="yes",2,0)+A2

Does that work?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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