+ Reply to Thread
Results 1 to 5 of 5

Formula returns a minus figure until the second date box is filled

  1. #1
    Registered User
    Join Date
    09-18-2007
    Posts
    30

    Formula returns a minus figure until the second date box is filled

    I have a calculation to work out number of elapsed days

    =SUM(INT((WEEKDAY(A4-{2,3,4,5,6})+C4-A4)/7))-1

    But it will return a minus figure until the second date box is filled, which only occurs at the end of a job. Is there a way to make this formula display a blank cell if the figure is a minus?

    Monday's.......I hate 'em!

  2. #2
    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
    Maybe.

    =IF(C4="","",SUM(INT((WEEKDAY(A4-{2,3,4,5,6})+C4-A4)/7))-1)

    VBA Noob
    _________________________________________


    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 !!!

  3. #3
    Registered User
    Join Date
    09-18-2007
    Posts
    30
    That'll do just dandy, thanks!

  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
    No problem. Glad it helped

    PS. Please read forum rules below. Titles should relate to the excel problem not how you feel on Monday morning

    VBA Noob

  5. #5
    Registered User
    Join Date
    09-18-2007
    Posts
    30
    Apologies, hadn't read that bit!

+ 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