+ Reply to Thread
Results 1 to 2 of 2

Insert Sumif formula but range may change

  1. #1
    Forum Contributor
    Join Date
    09-09-2008
    Location
    Middlesbrough, England
    MS-Off Ver
    2007
    Posts
    174

    Insert Sumif formula but range may change

    Hi,

    I have created the attached workbook and a macro which i am to roll up performance.

    The issue i have is each day the data input will increase so a standard
    Please Login or Register  to view this content.
    formula will not work.

    If you look at "Daily (Data)" i would like a formula in there which does a sumif but excludes brand. As stated above the current source data runs from row 2:19 but this will change on a daily basis. Is there any code which i can use to auto select the 1st section for the sumif calculation?

    Kind Regards
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Insert Sumif formula but range may change

    SUMIF allows the sum of one range using a filter on an adjacent range by some single criteria:

    =SUMIF(A:A, "Cat", B:B)


    If you need more than one criteria, switch to SUMIFS which allows as many filtering criteria as you wish:

    =SUMIFS(B:B, A:A, "Cat", C:C, "Boston")


    As long as there isn't junk in the same columns further down, there's no need to limit a SUMIF or SUMIFS to any specific set of rows, it is very robust if refer to columns as a whole.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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. [SOLVED] sumif formula automatic date change criteria
    By sonor_nut in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-17-2013, 08:45 AM
  2. Formula to insert a blank row at every change in a colum
    By JCOOL1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-09-2013, 08:49 PM
  3. Replies: 6
    Last Post: 07-16-2012, 12:05 PM
  4. Insert text recognition in a SUMIF Formula
    By necht_angel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-16-2011, 05:12 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