Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In row A I have dates 31-Jan-08, 28-Feb-08, 31-Mar-08...etc.
In row B I want an =IF function such that a certain formula will apply if the date is 31st December, regardless of the year. Can anyone tell me how to refer to the date in such a funtion? i.e. =IF(A1=?????,25*3,25*4) if A1 is 31-Dec-** then 25 times 3, otherwise 25 times 4. Many thanks for any help Andrew |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks all for a comprehensuive and speedy reply (it was obviously easier
than I thought!). "Andrew Mackenzie" wrote in message ... In row A I have dates 31-Jan-08, 28-Feb-08, 31-Mar-08...etc. In row B I want an =IF function such that a certain formula will apply if the date is 31st December, regardless of the year. Can anyone tell me how to refer to the date in such a funtion? i.e. =IF(A1=?????,25*3,25*4) if A1 is 31-Dec-** then 25 times 3, otherwise 25 times 4. Many thanks for any help Andrew |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way:
=25*(3 + (MONTH(A1)=12)*(DAY(A1)=31)) In article , "Andrew Mackenzie" wrote: In row A I have dates 31-Jan-08, 28-Feb-08, 31-Mar-08...etc. In row B I want an =IF function such that a certain formula will apply if the date is 31st December, regardless of the year. Can anyone tell me how to refer to the date in such a funtion? i.e. =IF(A1=?????,25*3,25*4) if A1 is 31-Dec-** then 25 times 3, otherwise 25 times 4. Many thanks for any help Andrew |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way
=IF(AND(MONTH(A1)=12,DAY(A1)=31),75,100) -- Regards, Peo Sjoblom "Andrew Mackenzie" wrote in message ... In row A I have dates 31-Jan-08, 28-Feb-08, 31-Mar-08...etc. In row B I want an =IF function such that a certain formula will apply if the date is 31st December, regardless of the year. Can anyone tell me how to refer to the date in such a funtion? i.e. =IF(A1=?????,25*3,25*4) if A1 is 31-Dec-** then 25 times 3, otherwise 25 times 4. Many thanks for any help Andrew |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
try
=if(and(month(a1)=12,day(a1)=31),3,4)*25 -- Don Guillett Microsoft MVP Excel SalesAid Software "Andrew Mackenzie" wrote in message ... In row A I have dates 31-Jan-08, 28-Feb-08, 31-Mar-08...etc. In row B I want an =IF function such that a certain formula will apply if the date is 31st December, regardless of the year. Can anyone tell me how to refer to the date in such a funtion? i.e. =IF(A1=?????,25*3,25*4) if A1 is 31-Dec-** then 25 times 3, otherwise 25 times 4. Many thanks for any help Andrew |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=IF(AND(DAY(A1)=31,MONTH(A1)=12),25*3,25*4)
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Andrew Mackenzie" wrote in message ... In row A I have dates 31-Jan-08, 28-Feb-08, 31-Mar-08...etc. In row B I want an =IF function such that a certain formula will apply if the date is 31st December, regardless of the year. Can anyone tell me how to refer to the date in such a funtion? i.e. =IF(A1=?????,25*3,25*4) if A1 is 31-Dec-** then 25 times 3, otherwise 25 times 4. Many thanks for any help Andrew |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One mo
=if(text(a1,"mmdd")="1231",25*3,25*4) and another: =25*(4-(TEXT(A1,"mmdd")="1231")) This portion: (TEXT(A1,"mmdd")="1231") will return true or false. But when excel subtracts it from 4, it'll see true/false as 1 or 0. Andrew Mackenzie wrote: In row A I have dates 31-Jan-08, 28-Feb-08, 31-Mar-08...etc. In row B I want an =IF function such that a certain formula will apply if the date is 31st December, regardless of the year. Can anyone tell me how to refer to the date in such a funtion? i.e. =IF(A1=?????,25*3,25*4) if A1 is 31-Dec-** then 25 times 3, otherwise 25 times 4. Many thanks for any help Andrew -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I hope you mean =25*(4 - (MONTH..., rather than =25*(3 + (MONTH... ?
-- David Biddulph "JE McGimpsey" wrote in message ... One way: =25*(3 + (MONTH(A1)=12)*(DAY(A1)=31)) In article , "Andrew Mackenzie" wrote: In row A I have dates 31-Jan-08, 28-Feb-08, 31-Mar-08...etc. In row B I want an =IF function such that a certain formula will apply if the date is 31st December, regardless of the year. Can anyone tell me how to refer to the date in such a funtion? i.e. =IF(A1=?????,25*3,25*4) if A1 is 31-Dec-** then 25 times 3, otherwise 25 times 4. Many thanks for any help Andrew |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date question | Excel Worksheet Functions | |||
Date question | Excel Worksheet Functions | |||
Date Question | Excel Worksheet Functions | |||
Date question | Excel Worksheet Functions | |||
Date Question | Excel Discussion (Misc queries) |