+ Reply to Thread
Results 1 to 12 of 12

Print months in nextcell basing on dates

  1. #1
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Print months in nextcell basing on dates

    hi , i had a worksheet with cells containing dates in Column A.I want to print the months like APR or MAY depending upon the month returned by the date.
    I had raised this query before.I got the answer saying to Use =Month() in the next cell containing the dates. But i m getting the wrong result.
    whatever date is entered in the column A i m getting January as the result. What went wrong. I even formatted the cells with MMMM also .Kindly help me

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Print months in nextcell basing on dates

    You can use just =A1 and format that as custom: MMMM

    or use formula: =Text(A1,"MMMM")

    where A1 has original date.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Re: Print months in nextcell basing on dates

    Yeah,now i succeeded.what if had cut off dates like My Accounting Period starts from ;1-04-09 TO 20-04-2009 - APRIL
    21-04-2009 TO 20-05-2009- MAY and so on.... what to do in this kind of situation

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Print months in nextcell basing on dates

    Not sure what you mean..

    What exactly is in the cell and what exactly do you want in next cell?

  5. #5
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Re: Print months in nextcell basing on dates

    I want to return the same thing(Months) but the starting & ending dates differ.when there is date between 01-04-2009 to 20-04-2009 should return April and so on.....

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Print months in nextcell basing on dates

    So is this: "01-04-2009 to 20-04-2009" in one cell and you want the month for this part: "20-04-2009"? I am a little confused

  7. #7
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Re: Print months in nextcell basing on dates

    no no.if there are dates in between the date :01-04-2009 to 20-04-2009.it should return APRIL

    for example: 06-04-2009 should return april like so on....

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Print months in nextcell basing on dates

    Sorry... maybe it is basic.. but I am lost... I really don't understand your question.. hope someone else understands and can help...

    Or perhaps post a sample workbook showing what you want.

  9. #9
    Forum Contributor
    Join Date
    01-13-2009
    Location
    Mumbai
    MS-Off Ver
    Excel 2003, 2007
    Posts
    168

    Re: Print months in nextcell basing on dates

    Hi excelkeek,

    Do you want it this way

    A1 --------------------------------------------- A2

    Date betn 01-04 to 20-04 ------------------ April
    Date betn 21-04 to 20-05 -------------------May

    Is this what you want??

    Vaibhav
    Last edited by c.vaibhav; 04-28-2009 at 01:21 PM.

  10. #10
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Re: Print months in nextcell basing on dates

    Exactly as mr.vaibhav had told.sorry if i could not pose the question properly . i m tired working in the office

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Print months in nextcell basing on dates

    Okay, I think I get it now...

    First you would have a list of all the starting date ranges...

    i.e.

    1/04/09
    21/04/09
    21/05/09
    etc..

    then use formula:

    =TEXT(LOOKUP(A1,X1:X100),"MMMM")

    where X1:X100 contains dates list. and A1 contains date to match.

    or you can use just

    LOOKUP(A1,X1:X100) custom formatted as "MMMM"

  12. #12
    Forum Contributor
    Join Date
    01-13-2009
    Location
    Mumbai
    MS-Off Ver
    Excel 2003, 2007
    Posts
    168

    Re: Print months in nextcell basing on dates

    Hi,

    You can also use nested if loops.

    I have attached the excel file.

    Just enter the date in column G and column H updates the month.

    Vaibhav
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1