+ Reply to Thread
Results 1 to 3 of 3

IF AND - a senior moment

  1. #1
    Registered User
    Join Date
    08-21-2007
    Posts
    90

    IF AND - a senior moment

    Having difficulty with something that should be so easy.

    I need a formula for:

    for cell C2 =IF A2 is not blank AND A2 + B2 is not blank then C1+A2-B2, else 0

    (any values in A2 and B2 might be a positive or a negative number)


    I have looked at Excel help and used the formula

    IF(AND A2 <> " ", B2 <> " ", C1+A2-B2, 0) and it returns wrong result.


    My mind just can't get aorund this simple issue today.

    Thanks for any help!

  2. #2
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676
    just need to tweak the syntax a little, try

    IF(AND(A2<>"",B2<>""),C1+A2-B2,0)

  3. #3
    Registered User
    Join Date
    08-21-2007
    Posts
    90

    Thanks

    Works perfectly.

    Thank you!

+ 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