Forum Discussion
Numbers calculation
- Oct 31, 2019
Hi Holgi
With the help of below Nested If formulas you can achieve your requirements:
For 500Mmg =IF(MOD(B3,500)=0,B3/500,IF(MOD(B3,500)>MOD(B3,350),ROUNDDOWN((B3/500),0),1))
For 350mg (=IF(D3*500>=B3,0,IF(MOD(B3,350)=0,B3/350,IF(MOD(B3,500)>MOD(B3,350),1,ROUNDDOWN(B3/350,0))))
A sample file is also attached for your reference, hope it will help you.
In case you need some tweak in the formula please let me know.
Thanks
Tauqeer
Hi Holgi
With the help of below Nested If formulas you can achieve your requirements:
For 500Mmg =IF(MOD(B3,500)=0,B3/500,IF(MOD(B3,500)>MOD(B3,350),ROUNDDOWN((B3/500),0),1))
For 350mg (=IF(D3*500>=B3,0,IF(MOD(B3,350)=0,B3/350,IF(MOD(B3,500)>MOD(B3,350),1,ROUNDDOWN(B3/350,0))))
A sample file is also attached for your reference, hope it will help you.
In case you need some tweak in the formula please let me know.
Thanks
Tauqeer
- HolgiOct 31, 2019Copper Contributor
Hi Tauqeer,
Thanks so much, thats very helpful! Your help is very much appreciated!
Have a good rest of the day!
Kindest regards,
Holgi
- tauqeeracmaOct 31, 2019Iron Contributor
Holgi You are welcome
- HolgiNov 04, 2019Copper Contributor
Hi Tauqeer, there is a mistake in the formula - for values between 850 and 1000 mg, the formula gives one vial each, which is not sufficient. I am attaching the file which you had sent and added one line to demonstrate that it does not calculate correctly. Would you be so kind and have a look into it? -Thanks in anticipation, your continued support is highly appreciated!
Kindest
Holgi