Consulting

Results 1 to 4 of 4

Thread: Formula to look in range

  1. #1

    Formula to look in range

    I dont know how to explain this really
    I have a range with amounts in it
    & another amount which could be the addition of 2 or more cells in this range

    how can I have a formula that looks at this cell(specified amount) & then look in all the range to find a match whether it is found in one of the cells in the range or is the addition of several cells.
    Can this be done

    the reason I want to do this
    is have a list of amounts for every bill
    & then an amount which could be the cumulative of all bills related to a specific services.


    thanks

  2. #2
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    Al,

    You can use sumproduct for this....basic syntax below:

    =SUMPRODUCT(--(RangetoCompare=Criteria1),(RangetoTotal))

    You would have your 1 column range of Categories or identified services where criteria1 is the cell containing your supposed matching point of interested (or the string of what you want, such as "General")

    The range to sum would be a range of equal size but the column containing your values to total up.

    If you need help seeting it up, shoot me a copy of sample data..You can have multiple critera set up the same as criteria1 above, having a separate range for each one.

    Just keep your ranges the same size. The -- operators for true/false into 1/0 and multiples each element of the range...so the resulting total is only where they match.

    Hope that helps.
    If you have posted the same question at multiple forums, please read this IMPORTANT INFO.

    Please use the thread tools to mark your thread Solved


    Please review the Knowledge Base
    for samples and solutions , or to submit your own!




  3. #3
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    If only a single condition exists, I recommend using a COUNTIF or SUMIF type of formula.

    Quote Originally Posted by XLGibbs
    The -- operators for true/false into 1/0 and multiples each element of the range...so the resulting total is only where they match.
    A more in-depth explanation, with great links, found here.

  4. #4
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    Quote Originally Posted by firefytr
    If only a single condition exists, I recommend using a COUNTIF or SUMIF type of formula.


    A more in-depth explanation, with great links, found here.
    Sure if you want to do it the EASY way with only 1 condition

    Silly me.
    If you have posted the same question at multiple forums, please read this IMPORTANT INFO.

    Please use the thread tools to mark your thread Solved


    Please review the Knowledge Base
    for samples and solutions , or to submit your own!




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •