+ Reply to Thread
Results 1 to 3 of 3

variable criteria in sumif formula

Hybrid View

davemon variable criteria in sumif... 12-09-2015, 07:48 PM
Pete_UK Re: variable criteria in... 12-09-2015, 08:21 PM
davemon Re: variable criteria in... 12-09-2015, 10:21 PM
  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    Cicero, NY
    MS-Off Ver
    Excel 2013
    Posts
    35

    variable criteria in sumif formula

    I have the following formula in cell D2: =SUMIF('115281'!$A$4:$A$50,D$2,'115281'!$D$4:$D$50). I'm curious if there is a way for the formula
    to pull the '115281' from cell B2. Please see attached file.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: variable criteria in sumif formula

    Sure, you do it like this:

    =SUMIF(INDIRECT("'"&B2&"'!$A$4:$A$50"),D$2,INDIRECT("'"&B2&"'!$D$4:$D$50"))

    Strictly speaking, you don't need the $ symbols for the ranges as they are now text values, and so won't change if you copy the formula elsewhere.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-12-2013
    Location
    Cicero, NY
    MS-Off Ver
    Excel 2013
    Posts
    35

    Re: variable criteria in sumif formula

    Pete,
    That works perfectly. Thanks so much!!
    Dave

+ 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. How do I add a variable row number into a SumIf formula cell reference
    By Whit01 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-16-2013, 06:19 AM
  2. SUMIF or SUMIF's formula with multiple criteria
    By jackiemariee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-30-2013, 06:19 PM
  3. sumif with fixed and variable criteria
    By bufharry in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 12-21-2010, 04:23 AM
  4. SUMIF formula - adding another variable..
    By AllenMead in forum Excel General
    Replies: 2
    Last Post: 09-30-2010, 09:39 AM
  5. inserting variable filename into sumif formula
    By sirensiren in forum Excel General
    Replies: 6
    Last Post: 01-08-2010, 05:20 AM
  6. sumif with a variable criteria and polynomial problem
    By Niels in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-29-2006, 10:11 AM
  7. [SOLVED] SUMIF Formula w/ OR Criteria
    By SJT in forum Excel General
    Replies: 5
    Last Post: 08-04-2006, 12:05 PM
  8. how to use a variable for the criteria in a sumif function?
    By Dick B. in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-01-2006, 08:00 AM

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