Forum Discussion
Nested IF
- Feb 07, 2018
=IF(C3,C3*F3,IF(D3,D3*F3,(INT(b3)+MAX((MOD(b3,1)>=0.5)*0.65, MOD(b3,1)))*f3))
I didn't know if this meet your needs.
In addition to Willy's answer, see if this formula works for you.
=IF(MOD(B3,1),SUM(INT(B3)*1000,650),B3*1000)
Basically, I've devised an IF statement that checks to see if the number is a whole number or decimal.
If it is a whole number, then do B# x 1000.
If it is a decimal value, then B# x 1000 + 650.
I have also modified your spreadsheet and have attached it with the formula in action.
The formula is based on the assumption that you will use only 0.5 increments as you have stated in your post (therefore anything like .1 to 0.9 will always read as $650).
I hopefully have understood you right with what you want but if not, Willy and I can try again!
Cheers
Damien
Damien,
You understood me perfectly.
While it's unlikely I'll use a decimal other than .5, I would prefer to preserve the ability to do so. I did not however state that in previous posts.
I think I get it now. The magic lies in INT. Basically, the formula says if it's a whole number, multiply by 1000 (or F3) and if it contains a decimal, substitute .65 for whatever the decimal is.
I'm glad I got two different responses. That gave me a couple ways to look at it and made it click for. I will use both versions. Yours I will use to distribute to staff that don't have the authority to change pricing and Willy's I will use in my version.
Thanks! I sincerely appreciate both of you being willing to help out.
- Damien_RosarioFeb 07, 2018Silver ContributorThanks for the kind words Randy. I think we (in the tech community) just have an awesome amount of fun helping good people like yourself problem solve things.
We're always here if you need anything!
Best wishes
Damien