+ Reply to Thread
Results 1 to 13 of 13

Formula to show first day of the month based on date in another cell

  1. #1
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Formula to show first day of the month based on date in another cell

    Hello everyone!

    As an example, in A1 I have this date, which is 13 June 2013.
    A1: 13-06-2013

    What formula would I need to show the first day of the month, based on that date in A1:
    B1 should be: 01-06-2013

    And how can I show the first day of the next month, based on A1:
    B2 should be: 01-07-2013

    Kind regards,

    Marco

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Formula to show first day of the month based on date in another cell

    In B1:

    =EOMONTH(A1,-1)+1

    And in B2:

    =EOMONTH(A1,0)+1

  3. #3
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Formula to show first day of the month based on date in another cell

    First answer:
    Please Login or Register  to view this content.
    Second answer:
    Please Login or Register  to view this content.
    Second one doesn't work with december, not sure how to implement that.

  4. #4
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Formula to show first day of the month based on date in another cell

    Thank you both for the answers!

    @RHCPgergo:
    When I enter "20-12-2013" in A1, your second formula returns "1-1-2014", so it seems to be working.

    @Andrew-R
    It seems that your second answer has a problem with December. With the same in A1 as above, your formula returns "1-12-2013".

    Kind regards and thank you!

    Marco

  5. #5
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Formula to show first day of the month based on date in another cell

    I accidently double posted above post and I'm not sure if I can delete this post or not.
    Last edited by Marco-Kun; 01-16-2013 at 11:29 AM. Reason: Double post.. ^_^

  6. #6
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Formula to show first day of the month based on date in another cell

    Wow, you're right it works. I just assumed it doesn't.

  7. #7
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Formula to show first day of the month based on date in another cell

    Haha alright! Thanks for your help!

  8. #8
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Formula to show first day of the month based on date in another cell

    Quote Originally Posted by Marco-Kun View Post
    @Andrew-R
    It seems that your second answer has a problem with December. With the same in A1 as above, your formula returns "1-12-2013".
    Not in my copy of Excel it doesn't, and it's hard to see how it could.

  9. #9
    Forum Contributor Marco-Kun's Avatar
    Join Date
    04-14-2009
    Location
    Holland
    MS-Off Ver
    Dutch:2007
    Posts
    298

    Re: Formula to show first day of the month based on date in another cell

    @Andrew

    Oops! I'm sorry Andrew! I didn't save my test file yesterday to test both your formula so I don't know what went wrong. But indeed, yours work perfectly fine as well.

    Yesterday my test file looked like this:

    A1: 20-12-2013

    These containing your fomula
    B1: 1-12-2013
    B2: 1-12-2013

    These containing RHCPgergo's formula
    C1: 1-12-2013
    C2: 1-1-2014

    I probably inserted the same formula from you in B2 as I did in B1 or some stupid stuff like that.

    Sorry again!

    Kind regards,

    Marco

  10. #10
    Registered User
    Join Date
    05-11-2016
    Location
    new zealand
    MS-Off Ver
    ms 2013
    Posts
    16

    Re: Formula to show first day of the month based on date in another cell

    Hi,
    why second answer doesn't work?

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Formula to show first day of the month based on date in another cell

    kiwikloud welcome to the forum

    1st, it seems the 2nd formula did work.
    2nd, Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  12. #12
    Registered User
    Join Date
    05-11-2016
    Location
    new zealand
    MS-Off Ver
    ms 2013
    Posts
    16

    Re: Formula to show first day of the month based on date in another cell

    Sry, I didn't know the rules.
    Last edited by kiwikloud; 05-11-2016 at 01:40 AM.

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Formula to show first day of the month based on date in another cell

    Not a problem

+ 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