+ Reply to Thread
Results 1 to 10 of 10

Function Problem

  1. #1
    Registered User
    Join Date
    01-12-2007
    Posts
    15

    Function Problem

    Here is what I am trying to do. We get 6.67 hours a month vacation. I want a cell that will calculate 6.67 x the month. So that it will automatically change on the 1st of each month. Is there a way to do this.

    Thanks

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    try this, and tell me if it works:

    =IF(DAY(TODAY())=1),MONTH(TODAY())*6.67,"")

    that formula will mulitply month (ie, Jan=1, Feb=2, etc) times 6.67

    it will only do the calculation if it is the first of the month

  3. #3
    Registered User
    Join Date
    01-12-2007
    Posts
    15
    I copied and pasted the info into a cell and it says that the formula that

    you typed has an error.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Just a extra )

    Try

    =IF(DAY(TODAY())=1,MONTH(TODAY())*6.67,"")

    Warning - Please stop Spam posting duplicate posts !!

    VBA Noob
    Last edited by VBA Noob; 02-16-2007 at 03:18 PM.
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Registered User
    Join Date
    01-12-2007
    Posts
    15
    OK it took that but the cell is blank. The cell should show 13.34 right?
    6.67 for January 1
    6.67 for February 1
    13.34 total right

    Why is the cell blank

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try this mod of BigBas formula

    =IF(MONTH(TODAY())=2,MONTH(TODAY())*6.67,"")

    VBA Noob

  7. #7
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    It sounds like you don't need the IF statement. Try this:

    =MONTH(TODAY())*6.67

  8. #8
    Registered User
    Join Date
    01-12-2007
    Posts
    15
    =MONTH(TODAY())*6.67

    That work perfectly exactly what I was looking for.

    Thanks

  9. #9
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    and you only had to post once not 4 times

    VBA Noob

  10. #10
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Quote Originally Posted by jasoncw
    It sounds like you don't need the IF statement. Try this:

    =MONTH(TODAY())*6.67
    I considered doing it that way, but it was hard to do without more info. If he had some sort of daily total setup, I was afraid that it would add 6.67 for each day of the month.

    Either way, I'm glad we found a suitable solution.

+ 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