+ Reply to Thread
Results 1 to 4 of 4

first of current month for the data?

  1. #1
    Forum Contributor
    Join Date
    07-23-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2016
    Posts
    210

    first of current month for the data?

    Hi,

    i am working on a script and looking for syntax which gives me the first date of the month in which i am running the macro.

    means i will run the same macro every month in the first week. whenever i run the macro i need the first date of that month in the A2 cell.

    if i am running the macro in september it should give me 09/01/2014
    if i am running the macro in october it should give me 10/01/2014

    can someone help me on this.

    regards,
    vimala k

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: first of current month for the data?

    Put this formula in the cell where you want to find the "first day of the current month".

    =EOMONTH(TODAY(),-1)+1
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: first of current month for the data?

    In VBA, this expression returns the first day of the current month:
    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Contributor
    Join Date
    07-23-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: first of current month for the data?

    Both of you thanks alot.. both are working fine..

    for me script is important more than the formula... and i learned a new formula today.

    once again thank you both.

    regards,
    vimala k

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Vloopup for data in current month
    By robmun50 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-29-2014, 02:21 PM
  2. [SOLVED] Determine work days in current month or next month based on day of the month
    By sbrnard in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-29-2014, 05:14 PM
  3. [SOLVED] Pick a cell containing current month actulas based what the current month is.
    By vanbasten007 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-10-2014, 01:17 AM
  4. [SOLVED] Macro to autofilter current month data
    By mangeshp4 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-10-2012, 06:46 AM
  5. [SOLVED] Auto populate cells from data in a 6 month range starting with the current month
    By ecarnley349 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-21-2012, 07:32 PM

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