![]() |
Month formula
I have a date in cell D2 (DD-MM-YYYY), I wish in cell D3, to put the
month only prior to that date. That date will change from time to time. Any help? TIA Esra |
Month formula
On Jun 30, 3:36*pm, Esradekan wrote:
I have a date in cell D2 (DD-MM-YYYY), I wish in cell D3, to put the month only prior to that date. *That date will change from time to time. Any help? TIA Esra in other words, I should have said, if the date in D2 is 30th June, I wish May to be teh result of the formula in D3 |
Month formula
One way, assuming you want the month to be returned as text in "mmm" format
In D3: =TEXT(DATE(YEAR(D2),MONTH(D2),0),"mmm") -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Esradekan" wrote in message ... On Jun 30, 3:36 pm, Esradekan wrote: I have a date in cell D2 (DD-MM-YYYY), I wish in cell D3, to put the month only prior to that date. That date will change from time to time. Any help? TIA Esra in other words, I should have said, if the date in D2 is 30th June, I wish May to be teh result of the formula in D3 |
Month formula
Here is one way...
=TEXT(DATE(YEAR(D2),MONTH(D2)-1,1),"mmmm") Rick "Esradekan" wrote in message ... On Jun 30, 3:36 pm, Esradekan wrote: I have a date in cell D2 (DD-MM-YYYY), I wish in cell D3, to put the month only prior to that date. That date will change from time to time. Any help? TIA Esra in other words, I should have said, if the date in D2 is 30th June, I wish May to be teh result of the formula in D3 |
Month formula
Actually, I'm pretty sure this simpler formula will always work...
=TEXT(DATE(0,MONTH(D2),0),"mmmm") Rick "Rick Rothstein (MVP - VB)" wrote in message ... Here is one way... =TEXT(DATE(YEAR(D2),MONTH(D2)-1,1),"mmmm") Rick "Esradekan" wrote in message ... On Jun 30, 3:36 pm, Esradekan wrote: I have a date in cell D2 (DD-MM-YYYY), I wish in cell D3, to put the month only prior to that date. That date will change from time to time. Any help? TIA Esra in other words, I should have said, if the date in D2 is 30th June, I wish May to be teh result of the formula in D3 |
Month formula
That won't work for any date in January.
Try this: =TEXT(D2-DAY(D2),"mmmm") -- Biff Microsoft Excel MVP "Rick Rothstein (MVP - VB)" wrote in message ... Actually, I'm pretty sure this simpler formula will always work... =TEXT(DATE(0,MONTH(D2),0),"mmmm") Rick "Rick Rothstein (MVP - VB)" wrote in message ... Here is one way... =TEXT(DATE(YEAR(D2),MONTH(D2)-1,1),"mmmm") Rick "Esradekan" wrote in message ... On Jun 30, 3:36 pm, Esradekan wrote: I have a date in cell D2 (DD-MM-YYYY), I wish in cell D3, to put the month only prior to that date. That date will change from time to time. Any help? TIA Esra in other words, I should have said, if the date in D2 is 30th June, I wish May to be teh result of the formula in D3 |
Month formula
Good point... and easily solved...
=TEXT(DATE(1,MONTH(A4),0),"mmmm") but, I like formula better (it's cleaner). Rick "T. Valko" wrote in message ... That won't work for any date in January. Try this: =TEXT(D2-DAY(D2),"mmmm") -- Biff Microsoft Excel MVP "Rick Rothstein (MVP - VB)" wrote in message ... Actually, I'm pretty sure this simpler formula will always work... =TEXT(DATE(0,MONTH(D2),0),"mmmm") Rick "Rick Rothstein (MVP - VB)" wrote in message ... Here is one way... =TEXT(DATE(YEAR(D2),MONTH(D2)-1,1),"mmmm") Rick "Esradekan" wrote in message ... On Jun 30, 3:36 pm, Esradekan wrote: I have a date in cell D2 (DD-MM-YYYY), I wish in cell D3, to put the month only prior to that date. That date will change from time to time. Any help? TIA Esra in other words, I should have said, if the date in D2 is 30th June, I wish May to be teh result of the formula in D3 |
Month formula
I left out a word...
but, I like YOUR formula better (it's cleaner). Rick "Rick Rothstein (MVP - VB)" wrote in message ... Good point... and easily solved... =TEXT(DATE(1,MONTH(A4),0),"mmmm") but, I like formula better (it's cleaner). Rick "T. Valko" wrote in message ... That won't work for any date in January. Try this: =TEXT(D2-DAY(D2),"mmmm") -- Biff Microsoft Excel MVP "Rick Rothstein (MVP - VB)" wrote in message ... Actually, I'm pretty sure this simpler formula will always work... =TEXT(DATE(0,MONTH(D2),0),"mmmm") Rick "Rick Rothstein (MVP - VB)" wrote in message ... Here is one way... =TEXT(DATE(YEAR(D2),MONTH(D2)-1,1),"mmmm") Rick "Esradekan" wrote in message ... On Jun 30, 3:36 pm, Esradekan wrote: I have a date in cell D2 (DD-MM-YYYY), I wish in cell D3, to put the month only prior to that date. That date will change from time to time. Any help? TIA Esra in other words, I should have said, if the date in D2 is 30th June, I wish May to be teh result of the formula in D3 |
Month formula
I left out a word...
I do that a lot, too! -- Biff Microsoft Excel MVP "Rick Rothstein (MVP - VB)" wrote in message ... I left out a word... but, I like YOUR formula better (it's cleaner). Rick "Rick Rothstein (MVP - VB)" wrote in message ... Good point... and easily solved... =TEXT(DATE(1,MONTH(A4),0),"mmmm") but, I like formula better (it's cleaner). Rick "T. Valko" wrote in message ... That won't work for any date in January. Try this: =TEXT(D2-DAY(D2),"mmmm") -- Biff Microsoft Excel MVP "Rick Rothstein (MVP - VB)" wrote in message ... Actually, I'm pretty sure this simpler formula will always work... =TEXT(DATE(0,MONTH(D2),0),"mmmm") Rick "Rick Rothstein (MVP - VB)" wrote in message ... Here is one way... =TEXT(DATE(YEAR(D2),MONTH(D2)-1,1),"mmmm") Rick "Esradekan" wrote in message ... On Jun 30, 3:36 pm, Esradekan wrote: I have a date in cell D2 (DD-MM-YYYY), I wish in cell D3, to put the month only prior to that date. That date will change from time to time. Any help? TIA Esra in other words, I should have said, if the date in D2 is 30th June, I wish May to be teh result of the formula in D3 |
Month formula
Hi
Format cell D3, FormatCellsNumberCustom mmm In Cell D3 enter =D2-DAY(D2) -- Regards Roger Govier "Esradekan" wrote in message ... On Jun 30, 3:36 pm, Esradekan wrote: I have a date in cell D2 (DD-MM-YYYY), I wish in cell D3, to put the month only prior to that date. That date will change from time to time. Any help? TIA Esra in other words, I should have said, if the date in D2 is 30th June, I wish May to be teh result of the formula in D3 |
All times are GMT +1. The time now is 01:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com