Consulting

Results 1 to 5 of 5

Thread: Solved: If statment to refer to a blank cell

  1. #1

    Solved: If statment to refer to a blank cell

    IT may be a little stupid the question
    but forgive me before hand

    I have an if statement that shoud refer to a cell
    if its blank G (date format) & H which id the bill number (format general)are blank
    then subtract the date in F (purchase date) from today's date
    if not (blank) then subtract the date in F from the bill date in G

    IF(G2<0,Networksdays(F2,H2),NETWORKDAYS(F2,TODAY()))

    using G> or <o doesnt do the trick for both cases

    Thanks in advance

  2. #2
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    =IF(AND(G2="",H2=""),TODAY()-F2,G2-F2)
    If you have posted the same question at multiple forums, please read this IMPORTANT INFO.

    Please use the thread tools to mark your thread Solved


    Please review the Knowledge Base
    for samples and solutions , or to submit your own!




  3. #3
    Thanks for replying
    I tried

    IF(AND(G2="",H2=""),TODAY()-F2,H2-F2)

    it worked fine but I want the networkdays as in only the working days between the 2 dates
    so i changed the formula to
    IF(AND(G2="",H2=""),NETWORKDAYS(F2,TODAY()),NETWORKDAYS(F2,H2)
    but it didn't work
    what am i doing wrong

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    = IF(AND(G2="",H2=""),NETWORKDAYS(F2,TODAY()),NETWORKDAYS(F2,H2))

    should work. What do you get?

  5. #5
    thanks for u both
    it worked out fine
    xlds, & gibbs
    I guess these are not ur real names

Posting Permissions

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