ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula (https://www.excelbanter.com/excel-discussion-misc-queries/20076-formula.html)

Deepwater

Formula
 
I am looking for a formula, that assiagn certain values for certain months.

for example : i want to compare the date in Cell B4, if it falls in
following months it should asign following values each month
for Jan, March, June, Aug, Sep = 24 , July=72 and remaining months " 0 "

Thanks inadvance.


Sandy Mann


Deepwater,

Try:

=IF(OR(MONTH(B4)={1,3,6,8,9}),24,IF(MONTH(B4)=7,72 ,0))

HTH

Sandy
--
to e-mail direct replace @mailinator.com with @tiscali.co.uk


"Deepwater" wrote in message
...
I am looking for a formula, that assiagn certain values for certain

months.

for example : i want to compare the date in Cell B4, if it falls in
following months it should asign following values each month
for Jan, March, June, Aug, Sep = 24 , July=72 and remaining months " 0 "

Thanks inadvance.




JE McGimpsey

One way:

=24*(SUMPRODUCT(--(MONTH($B$4)={1,3,6,8,9}))+3*(MONTH(B4)=7))

In article ,
Deepwater wrote:

I am looking for a formula, that assiagn certain values for certain months.

for example : i want to compare the date in Cell B4, if it falls in
following months it should asign following values each month
for Jan, March, June, Aug, Sep = 24 , July=72 and remaining months " 0 "

Thanks inadvance.


Deepwater

Thanks JE

I got it..

"JE McGimpsey" wrote:

One way:

=24*(SUMPRODUCT(--(MONTH($B$4)={1,3,6,8,9}))+3*(MONTH(B4)=7))

In article ,
Deepwater wrote:

I am looking for a formula, that assiagn certain values for certain months.

for example : i want to compare the date in Cell B4, if it falls in
following months it should asign following values each month
for Jan, March, June, Aug, Sep = 24 , July=72 and remaining months " 0 "

Thanks inadvance.



Deepwater

Thanks Sandy
I got it..
"Deepwater" wrote:

I am looking for a formula, that assiagn certain values for certain months.

for example : i want to compare the date in Cell B4, if it falls in
following months it should asign following values each month
for Jan, March, June, Aug, Sep = 24 , July=72 and remaining months " 0 "

Thanks inadvance.



All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com