![]() |
Date Question
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 |
Date Question
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 |
Date Question
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 |
Date Question
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 |
Date Question
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 |
Date Question
=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 |
Date Question
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 |
Date Question
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 |
All times are GMT +1. The time now is 02:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com