+ Reply to Thread
Results 1 to 6 of 6

SUMIF in discontinuous range with possible #N/As

Hybrid View

  1. #1
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: SUMIF in discontinuous range with possible #N/As

    You could use

    Formula: copy to clipboard
    =SUM(IF(ISNUMBER(N(OFFSET(A1,0,{0;2;4}))),N(OFFSET(A1,0,{0;2;4}))))

  2. #2
    Forum Contributor
    Join Date
    07-17-2012
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    218

    Re: SUMIF in discontinuous range with possible #N/As

    Quote Originally Posted by Bob Phillips View Post
    You could use

    Formula: copy to clipboard
    =SUM(IF(ISNUMBER(N(OFFSET(A1,0,{0;2;4}))),N(OFFSET(A1,0,{0;2;4}))))
    Thanks. This works well. Out of curiosity, why is N() necessary, for example in front of the offset? As I understand it, N just returns the number if it is a number, and the error if it is an error, so why not go directly with ISNUMBER(OFFSET ? I tried it and it didn't work, so it seems N() is necessary, but for what reason? Is it because due to programming limitations it needs to somehow "convert" from the array created by OFFSET?

+ 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