Consulting

Results 1 to 4 of 4

Thread: Getting the integer of the month

  1. #1

    Getting the integer of the month

    I have a quick question. I'm looking to get the current month's value (for example, it's November right now, so I should get the value of 11; May would be 5...etc.)

    Is there a function to do this with?

    Thanks in advance.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Try

    =MONTH(A1)

    where A1 holds the date to test
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Or without using a cell on the worksheet:

    Dim thismonth as integer

    thismonth = Month(Now)

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by SilverShark9

    Is there a function to do this with?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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