+ Reply to Thread
Results 1 to 3 of 3

If statement

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    Edinburgh
    MS-Off Ver
    2010
    Posts
    8

    If statement

    Hi all,

    I have a a performance log spreadsheet where we updated every day less weekends. I created the following formula so the it gets the average for the weekends so on Monday when they fill the flowmeter readings, the spreadsheet will calculate itself. It is working perfectly However when it is Friday the result is negative which makes the graphs all funny.

    =IF(B968="Friday",(C971-C968)/3,IF(B968="Saturday",D967,IF(B968="Sunday",D967,IF(AND(C969="",C971=""),NA(),C969-C968))))

    Can you guys see any way I could add any other if (C971="", NA()). My idea is while I do not put any information in C971 the first if statement should not work.

    I do not know if I made myself clear. so please let me know if you have any question before helping me out.

    Thanks

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,611

    Re: If statement

    Like this?
    =IF(C971="", NA(),(IF(B968="Friday",(C971-C968)/3,IF(B968="Saturday",D967,IF(B968="Sunday",D967,C969-C968)))))

  3. #3
    Registered User
    Join Date
    07-21-2014
    Location
    Edinburgh
    MS-Off Ver
    2010
    Posts
    8

    Re: If statement

    It did work, Thanks!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. compile error expected line number statement end statement
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2014, 10:12 AM
  2. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  3. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  4. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  5. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 PM

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