Results 1 to 3 of 3

Using an element of an array as criteria for SumIfs

Threaded View

  1. #1
    Registered User
    Join Date
    08-18-2015
    Location
    Dallas, TX
    MS-Off Ver
    2013
    Posts
    2

    Lightbulb Using an element of an array as criteria for SumIfs

    I have an array, which represents a list of criteria that I want to sum a column of a table by.

    Formula: copy to clipboard
    myCustomers = Split("Customer 1,Customer 2,Customer 3", ",")

    For i = 0 To UBound(myCustomers)

    If myCustomers(i) = "Customer 1" Then

    [d8].Select

    Do Until Selection.FormulaR1C1 = ""

    Selection.Offset(1, 0).Select

    Loop

    Selection.FormulaR1C1 = "=SumIfs(T_data2([Total Weight]), T_data2([Customer]), myCustomers(i))" 'The bug is here
    Else

    ...
    loop



    For some reason, that SumIfs says Application-defined or Object-defined error. I am positive that T_data2 is a table that exists. That table DOES have Total Weight and Customer columns. What am I doing wrong?

    Thank you for the help!
    Last edited by austincg1; 08-18-2015 at 11:01 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] SUMIFS formula that takes first seven of matching criteria from an array
    By Samuel_j in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-24-2015, 05:08 AM
  2. [SOLVED] SUMIFS/COUNTIFS array function question (multiple criteria)
    By akamenov88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2015, 07:08 PM
  3. [SOLVED] SUMIF or SUMIFS with Array Criteria
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2014, 11:25 AM
  4. Replies: 12
    Last Post: 01-14-2014, 01:56 PM
  5. [SOLVED] SUMIFS with multiple criteria evaluated against array?
    By opheim in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-07-2013, 09:03 AM
  6. [SOLVED] SUMIFS to match array of Criteria
    By amazinglazers in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-19-2013, 06:25 AM
  7. Help using a list/array as criteria in SUM(SUMIFS())
    By jaredmason in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-15-2012, 08:20 PM

Tags for this Thread

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