+ Reply to Thread
Results 1 to 5 of 5

Check col of dates.....each date is the first of the month

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Check col of dates.....each date is the first of the month

    Hi,

    I have a column of dates and i want a way of checking that each value in the column represents the first day of a given month........there are multiple months in the file i just want a way to verify that each day represents the first day of a month.......any ideas?

    fyi: need it in vba
    Last edited by welchs101; 10-25-2011 at 10:02 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,373

    Re: Check col of dates.....each date is the first of the month

    One way:

    =IF(A1=DATE(YEAR(A1),MONTH(A1),1),"first","not first")

    and copy down

    or, maybe simpler:

    =IF(DAY(A1)=1,"first","not first")

    Regards
    Last edited by TMS; 10-25-2011 at 09:56 AM.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Check col of dates.....each date is the first of the month

    Maybe something like this:

    Please Login or Register  to view this content.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Check col of dates.....each date is the first of the month

    thanks guys!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,373

    Re: Check col of dates.....each date is the first of the month

    You're welcome. Thanks for the rep.

    Regards

+ 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