Formula

Mr Rooter

New Member
Joined
Feb 5, 2025
Messages
5
Office Version
  1. Prefer Not To Say
Platform
  1. Windows
I am looking to write a formula for the following

How to write an excel formula to do the following K9 is cable J9 = $50 or if K9 is jet J9 = $150
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Welcome to the Board!

Formula to put in cell J9:
Excel Formula:
=IF(K9="cable",50,IF(K9="jet",150,""))
and format cell J9 as currency to get your dollar sign.
 
Upvote 0
Thank you soooo much can I add a third say if j9 is camera =$100?
 
Upvote 0
Last question i hope =IF(K9="cable",50,IF(K9="jet",150,IF(K9="camera",100,""))) if K9 is an empty cell then J9=0
 
Upvote 0
You could either do:
Excel Formula:
=IF(K9="cable",50,IF(K9="jet",150,IF(K9="camera",100,0)))
which says if K9 is anything OTHER than "cable", "jet", or "camera", then return 0.

Or, you could do:
Excel Formula:
=IF(K9="cable",50,IF(K9="jet",150,IF(K9="camera",100,IF(K9="",0,""))))
which would only return 0 if K9 is blank.
And if K9 is anything OTHER than "cable", "jet", "camera", or blank, it will return a blank.

Hopefully, you are picking up on the pattern here. It isn't really any different than your last follow-up question, in which you just add a new level of nesting for your new condition.
You can keep going, though if you have a lot, a lookup table and VLOOKUP or XLOOKUP formula would be a better option.
 
Upvote 0

Forum statistics

Threads
1,226,453
Messages
6,191,136
Members
453,642
Latest member
jefals

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