+ Reply to Thread
Results 1 to 10 of 10

Formula Question VLOOKUP SUMIF COUNTIF

  1. #1
    Registered User
    Join Date
    11-06-2015
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    7

    Formula Question VLOOKUP SUMIF COUNTIF

    Hello,

    I need help creating a formula that will do the following

    Lookup O/N, if there are 2 or more matches it needs to add the quantities together.
    It also needs to then count all of the O/N with a total quantity of between two number for example 1 and 499, and exclude the orders that are cancelled.

    I have attached an example excel sheet

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula Question VLOOKUP SUMIF COUNTIF

    Try this in C16

    =SUMIFS($F$2:$F$12,$F$2:$F$12,">=1",F2:F12,"<=499",$A$2:$A$12,$B16)

    You'll have to adjust the 1 and 499 to 500 and 999 for the next cell.

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula Question VLOOKUP SUMIF COUNTIF

    with a pivot table.

    see the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Registered User
    Join Date
    11-06-2015
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    7

    Re: Formula Question VLOOKUP SUMIF COUNTIF

    Hi,

    Thank you for your help, however this returns 100?

    I need a formula that would return the total number of orders with quantities between 1 and 499. but also remove the cancelled orders, and add up the quantities for o/n's that recur more than once

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula Question VLOOKUP SUMIF COUNTIF

    See the amended file with a pivot table.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula Question VLOOKUP SUMIF COUNTIF

    100 represents the SUM of the quantities for January that were between 1 and 499
    There was only 1 that met that criteria, and it was 100 in F3.

    Maybe I'm not understanding the rquirement.
    Can you post another file that has your expected results entered by hand, just for a few, say January and February for 1-499 and 500-999?

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,585

    Re: Formula Question VLOOKUP SUMIF COUNTIF

    Perhaps something like this. The formula for most of the table is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Note that it references a helper column, which could be hidden for aesthetic purposes, that sums the O/N's minus canceled orders. The final column has a different header and therefore the formula changes to:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let me know if you have any questions.

    Edit: the helper column formula needs to be modified: =IF(COUNTIFS(B$2:B2,B2)=1,SUMIFS(F$2:F$12,B$2:B$12,B2,H$2:H$12,""),"")
    Attached Files Attached Files
    Last edited by JeteMc; 08-09-2016 at 09:55 AM. Reason: Correcting formulas and updating file
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Formula Question VLOOKUP SUMIF COUNTIF

    Please see the attachment. May be this is what you want.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    08-09-2016
    Location
    Florida
    MS-Off Ver
    2016 MAC
    Posts
    3

    Re: Formula Question VLOOKUP SUMIF COUNTIF

    Hey I'm trying to insert a function that says "if cell B3 is 750 ml, then cell C3 is 25.36." And "if cell B4 is 1 L, then cell C4 is 33.81." In other words, one column states the size of bottle and the next column is how many ounces are in that bottle. I have been searching all morning how to make this happen but am striking out everywhere. Please help!

  10. #10
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Formula Question VLOOKUP SUMIF COUNTIF

    Quote Originally Posted by catcherandtherye View Post
    Hey I'm trying to insert a function that says "if cell B3 is 750 ml, then cell C3 is 25.36." And "if cell B4 is 1 L, then cell C4 is 33.81." In other words, one column states the size of bottle and the next column is how many ounces are in that bottle. I have been searching all morning how to make this happen but am striking out everywhere. Please help!
    Please post a separate thread. Don't post your problems on others' post.

    You can use those formulas:

    On C3:
    Please Login or Register  to view this content.
    On C4:
    Please Login or Register  to view this content.
    Last edited by sanram; 08-09-2016 at 01:24 PM.

+ 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. Sumif? Vlookup? Countif? i'm not sure
    By mfhowe1 in forum Excel General
    Replies: 5
    Last Post: 11-19-2012, 04:15 AM
  2. [SOLVED] SUMIF/VLOOKUP/COUNTIF type formula needed
    By liam_bettinson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-26-2012, 03:54 AM
  3. COUNTIF and Nested SUMIF question HELP
    By Speedring in forum Excel General
    Replies: 6
    Last Post: 02-07-2012, 03:59 PM
  4. COUNTIF and SUMIF Question
    By montreal1775 in forum Excel General
    Replies: 1
    Last Post: 02-25-2010, 07:28 AM
  5. COUNTIF & SUMIF formula question (excel/forum newbie)
    By RichardBewick in forum Excel General
    Replies: 7
    Last Post: 10-30-2008, 01:33 PM
  6. sumif/countif question
    By wannabeexcelpro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-15-2007, 02:28 AM
  7. [SOLVED] sumif / countif question
    By Gary Keramidas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-28-2005, 10:06 PM
  8. vlookup, sumif, if, countif, help
    By chintu49 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-26-2005, 10: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