Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

If, then formula for percentage calculation

Solved
Jump to Solution
2701 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Ons_Stories
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi, I’m wondering if there’s a way to do this. I have a table with the category of a used book and the original price. I want to create a formula that calculates the selling price based on the category of the book. So it would be IF category = A then take Original Price and deduct 30% to get the selling price. I’m not sure if I can do all of this in one go with an IF formula. But maybe I can do part of it? Thanks for the help!

1 Solution

Accepted Solutions
Jeremy_Oglesby
14 - Jupiter
14 - Jupiter

You can do this much more efficiently with a SWITCH() function:

{Price} *
SWITCH(
   {Category},
   "A", 0.7,
   "B", 0.6,
   "C", 0.8
)

See Solution in Thread

5 Replies 5

Hi @Ons_Stories,

Yes you can do that. You would use a nesting IF formula. Something like IF({Category}=A, Price0.7, if({Category}=B, Price0.75, … and so on

And so on.

This formula can be a little tricky, if you need help with it just let me know. I will need to see a screenshot of your table and know what you are trying to achieve with that formula.

BR,
Mo

Thanks, but yeah this didn’t help. It says there’s a problem with the formula and I’m not sure how to fix it. In the screenshot below you’ll see what I typed in the formula. I’m trying to formulate 70% of the Original Price IF Category = A and IF Category = B then 60% and so on!

It won’t let me upload screenshots, sorry

Jeremy_Oglesby
14 - Jupiter
14 - Jupiter

You can do this much more efficiently with a SWITCH() function:

{Price} *
SWITCH(
   {Category},
   "A", 0.7,
   "B", 0.6,
   "C", 0.8
)
Ons_Stories
5 - Automation Enthusiast
5 - Automation Enthusiast

That worked thanks a lot!