+ Reply to Thread
Results 1 to 3 of 3

How to Pass a Range to an Array Inside of a Sumif Function

  1. #1
    Forum Contributor
    Join Date
    05-17-2017
    Location
    Tallahassee
    MS-Off Ver
    15.32
    Posts
    206

    How to Pass a Range to an Array Inside of a Sumif Function

    Hey everyone. I have a range of cells that are the names of 5 companies. I want to use a sumif with the criteria being that it will only sum if it is company 1, company 2, company 3, company 4, OR company 5. I know that the following would work:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The issue is that the companies to include in this sumif need to be changed often. Thus, I created another worksheet that has the list of companies to be used. Sadly, the following won't work:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    How would I be able to reference a range such as 'Sheet2!$A$1:$A$5 in this formula?

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: How to Pass a Range to an Array Inside of a Sumif Function

    Remove the curly brackets and array enter the formula using Ctrl+Shift+Enter. Also note that with SUMIF, the sum range is the last range, not the first one, unlike with SUMIFS.
    Rory

  3. #3
    Forum Contributor
    Join Date
    05-17-2017
    Location
    Tallahassee
    MS-Off Ver
    15.32
    Posts
    206

    Re: How to Pass a Range to an Array Inside of a Sumif Function

    Thank you Rorya! That solved my question.

+ 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. Replies: 7
    Last Post: 03-12-2017, 03:20 PM
  2. Array inside the SUMIF problem
    By AHB10 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-12-2013, 10:10 AM
  3. [SOLVED] a concatenate function inside of a sumif
    By Aguhr in forum Excel General
    Replies: 4
    Last Post: 09-20-2012, 11:33 AM
  4. Pass two dimentional array to a function
    By SpringLily in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-08-2010, 05:24 AM
  5. Read Range To Array, Then Pass Array To Function
    By ProbablyNotARealName in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2010, 12:29 PM
  6. Pass Array to Range Object
    By Paluee in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-21-2010, 01:44 PM
  7. how to pass array values to function
    By exceltools2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2008, 09:39 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