+ Reply to Thread
Results 1 to 14 of 14

Alternative method to using sumif and vlookup

  1. #1
    Registered User
    Join Date
    07-27-2015
    Location
    Chicago
    MS-Off Ver
    Office 2013
    Posts
    7

    Alternative method to using sumif and vlookup

    I have ten rows with different data. The intent is to create another column and use the vlookup function to look up the category that the product is in the first column. I then will use a sumif to add up to a bigger category name based on the results I will receive from vlookup. Been trying to figure out for a while, if there is a short cut for this, so i don't have to create a second column to do individual vlookups on each row.


    Column A Column B
    Product A Vlookup(Product A, lookup array, 2)=catergory A
    Product B Vlookup(Product A, lookup array, 2)=catergory A
    Product C Vlookup(Product A, lookup array, 2)=catergory C
    Product D Vlookup(Product A, lookup array, 2)=catergory D
    Product E Vlookup(Product A, lookup array, 2)=catergory D
    Product F Vlookup(Product A, lookup array, 2)=catergory A

    Category A = SUMIF(the result of vlookup, A
    Category B = SUMIF(the result of vlookup, B
    Category C = SUMIF(the result of vlookup, C
    Category D = SUMIF(the result of vlookup, D

    Goal is to the sumif with one formula, without creating Column B

    Any suggestions would be great!

    Thank you,
    Boris

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Alternative method to using sumif and vlookup

    You can use SUMIFS or SUMPRODUCT.

    =SUMIFS(sum range, critieria range 1, criteria2, criteria range2, criteria2)

    =SUMPRODUCT((sum range)*(critieria range 1=criteria1)*(criteria range2=criteria2))
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Spammer
    Join Date
    02-04-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2013
    Posts
    190

    Re: Alternative method to using sumif and vlookup

    post a example

  4. #4
    Registered User
    Join Date
    07-27-2015
    Location
    Chicago
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Alternative method to using sumif and vlookup

    The problem with your suggestion is that I can't create the criteria range with one vlookup function. Does that make sense?

  5. #5
    Registered User
    Join Date
    07-27-2015
    Location
    Chicago
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Alternative method to using sumif and vlookup

    Quote Originally Posted by Jean.P28 View Post
    post a example
    There is an example in my original post.

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Alternative method to using sumif and vlookup

    So use the more flexible variant, LOOKUP or SUMPRODUCT, which allows you to nest as many functions and criteria within it as you want.

    There shouldn't be any need for VLOOKUP at all.

    Can you create small example to illustrate your need?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  7. #7
    Registered User
    Join Date
    07-27-2015
    Location
    Chicago
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Alternative method to using sumif and vlookup

    Quote Originally Posted by daffodil11 View Post
    So use the more flexible variant, LOOKUP or SUMPRODUCT, which allows you to nest as many functions and criteria within it as you want.

    There shouldn't be any need for VLOOKUP at all.

    Can you create small example to illustrate your need?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Book2.xlsx

    Please see attached for example.

  8. #8
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Alternative method to using sumif and vlookup

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    07-27-2015
    Location
    Chicago
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Alternative method to using sumif and vlookup

    Quote Originally Posted by daffodil11 View Post
    Please Login or Register  to view this content.
    Sorry, maybe I didn't explain myself. I don't want to use STEP 2. I want to automate inside a function.

  10. #10
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Alternative method to using sumif and vlookup

    In your attachment you have a line pointing to Column D as what you don't want.

    You need some sort of reference or index that indicates what each Product Category is; even if you're going to skip a few steps in between you need at least some sort of interpretation.

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Alternative method to using sumif and vlookup

    Sorry, maybe I didn't explain myself. I don't want to use STEP 2. I want to automate inside a function.
    OK. Then does this do what you want?
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  12. #12
    Registered User
    Join Date
    07-27-2015
    Location
    Chicago
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Alternative method to using sumif and vlookup

    Quote Originally Posted by daffodil11 View Post
    In your attachment you have a line pointing to Column D as what you don't want.

    You need some sort of reference or index that indicates what each Product Category is; even if you're going to skip a few steps in between you need at least some sort of interpretation.
    Apologies, what i meant to say, is I want to skip the step in STEP 1, in which I have to do a vlookup for each row. You are right, I still need the table mapping in STEP 2.

    Does that make sense?

    -Boris

  13. #13
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Alternative method to using sumif and vlookup

    Here's the example again, without Column D.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    07-27-2015
    Location
    Chicago
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Alternative method to using sumif and vlookup

    Quote Originally Posted by daffodil11 View Post
    Here's the example again, without Column D.
    Nicely Done! Exactly what I was looking for. I didn't realize I could do that with Sumproduct formula. In a way, this has the same functionality as vlookup, but instead with sumproduct. Thanks again for the prompt response!

+ 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] Wrap text in ControlTipText userform or Alternative method?
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-27-2015, 10:21 AM
  2. [SOLVED] INDEX + IF Formula or alternative method
    By kitttieluv in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2014, 12:55 PM
  3. Alternative Method for Countif, without Looping
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 11-03-2013, 04:50 PM
  4. help with indirect and sumproduct or alternative method (without VBA)
    By statang in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-05-2012, 08:17 AM
  5. any alternative method for looping?
    By dan2010 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-18-2010, 06:43 AM
  6. Alternative to SUMIF
    By ltmaiyk in forum Excel General
    Replies: 2
    Last Post: 01-22-2010, 12:06 AM
  7. Replies: 1
    Last Post: 05-27-2005, 12:05 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