IF formula and rounding

rhino80

New Member
Joined
Oct 2, 2019
Messages
2
HI All,

hoping for some quick help. Most probably a quick easy fix, but cant think what other way to work it. I am trying to use the below formula, but it isn't correct and I am not sure how to fix it.

=IF(Original!P2=400 or 250,0),round(Data!Q2/Data!P2*100,2)

Basically if the data in the original sheet is 400 or 250, then zi want it to be 40, if not then I want the calculation to be used.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Welcome to the MrExcel board!

Try
=IF(OR(Original!P2={400,250}),40,ROUND(Data!Q2/Data!P2*100,2))

Note that this will produce an error if Data!P2 is empty or zero.
 
Last edited:
Upvote 0
Thanks Peter. tried that formula but didn't seem to workand just did the calculation after data bit.
 
Upvote 0
Thanks Peter. tried that formula but didn't seem to work ..
In what way did it not work? Error message, wrong answer? Something else?


did the calculation after data bit.
What does 'calculation after data bit' mean?

What are the values in these cells
Original!P2
Data!P2
Data!Q2

What result did my formula give?
What result should it give?

Your original post was a bit confusing
=IF(Original!P2=400 or 250,0),round(Data!Q2/Data!P2*100,2)

Basically if the data in the original sheet is 400 or 250, then zi want it to be 40, if not then I want the calculation to be used.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,127
Members
453,021
Latest member
Justyna P

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