+ Reply to Thread
Results 1 to 3 of 3

Syntax issues with the OR function

  1. #1
    Registered User
    Join Date
    07-18-2007
    Location
    Seattle, WA, USA
    MS-Off Ver
    2016
    Posts
    42

    Syntax issues with the OR function

    OK, I need syntax help...

    I have a column, F3:F44 where I enter data. Cell F45 will subtotal these numbers, but if there is no data in the column, I want cell F45 to be blank. I'm running into syntax problems with the OR command. My original function looked like this,

    =IF(OR(F3=0,F4=0,F5=0...F44=0)=TRUE,"",SUM(F3:F44))

    Yes, I actually typed in every cell for F3->F44. The problem is that I'm entering to many arguments for the OR function. What, then, would be the syntax for the following idea? (or any other way of accomplishing the same end)

    =IF(OR(F3:F44=0)=TRUE,"",SUM(F3:F44))

    Any help is much appreciated!
    -Aikorei

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Syntax issues with the OR function

    Maybe something like this?:

    =IF(COUNT(F3:F44),SUM(F3:F44),"")

    The count function returns the count of numeric values in F3:F44.
    If there are no numbers....there's nothing to add!

    Is that something you can work with?
    Or...do you need something else?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    07-18-2007
    Location
    Seattle, WA, USA
    MS-Off Ver
    2016
    Posts
    42

    Thanks!

    That actually worked great. 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