ifs formula

CSHOCK

New Member
Joined
Nov 14, 2024
Messages
3
Office Version
  1. 2003 or older
Platform
  1. Windows
I'm trying to write a formula that figures the rate if a location is placed in a certain cell

=b15*IFS((B17=Kerry,85)(B17=VPGC,90)(b17=Cargill,90))

This is what I've written and I've tried multiple configurations of this but none of them seem to work.

help?
 

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.
Welcome to the Board!

Note that all literal values need to be placed between double-quotes, i.e. "Kerry", "VPGC", "Cargill".
Otherwise, they will be treated as named ranges and not literal values.

Also, your IFS formula is not structured right. You need commas between all the arguments, as described here: IFS function - Microsoft Support

So perhaps it should look like this:
Excel Formula:
=B15*IFS(B17="Kerry",85,B17="VPGC",90,B17="Cargill",90)
 
Upvote 0
Solution
Hi & welcome to MrExcel.
What version of Excel are you using? Your profile shows 2003 or older, but that doesn't have the IFS function.
 
Upvote 0
Hi & welcome to MrExcel.
What version of Excel are you using? Your profile shows 2003 or older, but that doesn't have the IFS function.
honestly I have no idea it's a work computer - 365 I think
 
Upvote 0
Welcome to the Board!

Note that all literal values need to be placed between double-quotes, i.e. "Kerry", "VPGC", "Cargill".
Otherwise, they will be treated as named ranges and not literal values.

Also, your IFS formula is not structured right. You need commas between all the arguments, as described here: IFS function - Microsoft Support

So perhaps it should look like this:
Excel Formula:
=B15*IFS(B17="Kerry",85,B17="VPGC",90,B17="Cargill",90)
fan effing tastic!!! Thank you!!!!!
 
Upvote 0
You are welcome.
Glad we were able to help!
 
Upvote 0
Since you're only testing 1 cell, you could use SWITCH:
=B15*SWITCH(B17,"Kerry",85,"VPGC",90,"Cargill",90)
 
Upvote 0
honestly I have no idea it's a work computer - 365 I think
In Excel on your work computer, click File -> Account and look for something like this

1731654191436.png


You can update your profile with both work and home versions and when you ask a question, tell the readers which version (or versions) any suggestion needs to work in. :)

For what its worth, I would not use IFS (not only for this situation but for any) as it is inefficient in my view.
The issue I have with it is that it evaluates every condition, even if the first one is true.

=B15*IFS(B17="Kerry",85,B17="VPGC",90,B17="Cargill",90)

As an example, let's suppose that B17 contains "Kerry"
IFS will evaluate the blue condition and find that it is TRUE.
In any case it will then evaluate the red condition and find it is FALSE
and it will then evaluate the purple condition and find that it is also FALSE
Now it will go back and see that the first TRUE condition is the first one (blue) and return 85. In other words the red test and the purple test were just wasting time & resources.
 
Upvote 0

Forum statistics

Threads
1,223,933
Messages
6,175,476
Members
452,646
Latest member
tudou

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