Excel odd even calculation

alliswell

New Member
Joined
Mar 16, 2020
Messages
3
Office Version
2007
Platform
Windows, Mobile
Rate 4.5 for even and rate 5 for odd
In A1 is quantity and B1 is Result
I want is when i input odd number as quantity in A1 that is 5 then result should be 23 in b1. I calculated rate 4.5 for even and 5 for odd quantities. Suppose quantity is even that is 4 result comes as 18. And so on...
Thanks.
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

KRice

Board Regular
Joined
Dec 9, 2003
Messages
171
Office Version
2019
Platform
Windows
Try this...does it give the results you expect?
Book1
AB
1QuantityResult
215
329
4315
5418
6525
Sheet4
Cell Formulas
RangeFormula
B2:B6B2=IF(ISEVEN(A2),4.5*A2,5*A2)
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
43,407
Office Version
365
Platform
Windows
.. or we could save a tiny bit by not repeating the original cell: :)

20 03 27.xlsm
AB
1QuantityResult
215
329
4315
5418
6525
Even Odd
Cell Formulas
RangeFormula
B2:B6B2=A2*IF(ISODD(A2),5,4.5)



Hopefully this was a typo?
I want is when i input odd number as quantity in A1 that is 5 then result should be 23 in b1
 

alliswell

New Member
Joined
Mar 16, 2020
Messages
3
Office Version
2007
Platform
Windows, Mobile
Quantity 3 should come to 14 and quantity 5 should come to 23.
See now i will explain. in quantity 3, is one pair of even 4.5+4.5+5=14 in quantity 5, 4.5+4.5+4.5+4.5+5=23
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
43,407
Office Version
365
Platform
Windows
Like this? If not, please give some more examples (including for even numbers) with the calculation steps.

20 03 27.xlsm
AB
1QuantityResult
215
329
4314
5418
6523
Even Odd
Cell Formulas
RangeFormula
B2:B6B2=FLOOR(A2,2)*4.5+5*ISODD(A2)
 

Forum statistics

Threads
1,089,217
Messages
5,406,916
Members
403,111
Latest member
Donbozone

This Week's Hot Topics

Top