+ Reply to Thread
Results 1 to 10 of 10

Count the number of items sold in one column based on the quantity in another column

  1. #1
    Registered User
    Join Date
    01-28-2010
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    40

    Count the number of items sold in one column based on the quantity in another column

    I am trying to count the number of items sold in one column based on the value in another column.
    For example: Column A shows numbers sold and Column B is the day they were sold on, how do I get column C to show me the combination of the two?

    Column A Column B Column C
    2 Wednesday 3
    1 Wednesday
    3 Thursday 6
    3 Thursday
    2 Friday 4
    2 Friday

    Many thanks
    Last edited by mike_m1; 08-20-2013 at 05:51 AM. Reason: Solved

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Count the number of items sold in one column based on the quantity in another column

    if possible can u please attached sample excel workbook
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Registered User
    Join Date
    01-28-2010
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    40

    Re: Count the number of items sold in one column based on the quantity in another column

    Example attached.

    Thanks
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Count the number of items sold in one column based on the quantity in another column

    now try this attached file
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-28-2010
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    40

    Re: Count the number of items sold in one column based on the quantity in another column

    Is there an alteration we could make to the formula if on some days there were 6 references and on other 1 and to have the total placed alongside the first instance, even if there are 5 Saturdays or 1 Monday?

    Many thanks

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Count the number of items sold in one column based on the quantity in another column

    In C1

    =IF(COUNTIF($B$1:B1,B1)>1,"",SUMIF($B$1:$B$6,B1,$A$1:$A$6))

    Copy down.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  7. #7
    Registered User
    Join Date
    01-28-2010
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    40

    Re: Count the number of items sold in one column based on the quantity in another column

    Thanks for that, does that formula assume there are 6 row entries? What would need to change if this was to be 35 rows?

    Many thanks

  8. #8
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Count the number of items sold in one column based on the quantity in another column

    does that formula assume there are 6 row entries? What would need to change if this was to be 35 rows?
    Yes..change ranges accordingly

    In C1
    =IF(COUNTIF($B$1:B1,B1)>1,"",SUMIF($B$1:$B$35,B1,$A$1:$A$35))
    Copy down

  9. #9
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Count the number of items sold in one column based on the quantity in another column

    if you got your solution then please don't forget click on ADD REPUTATION and mention your valuable comments for us and mark this thread as SOLVED

  10. #10
    Registered User
    Join Date
    01-28-2010
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    40

    Re: Count the number of items sold in one column based on the quantity in another column

    Excellent, thank you guys, you have solved me query with great clarity.

    Many thanks

+ 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. Replies: 1
    Last Post: 08-15-2013, 04:12 PM
  2. Replies: 12
    Last Post: 09-06-2012, 07:24 PM
  3. Replies: 9
    Last Post: 06-08-2012, 06:22 PM
  4. How to Update Stock quantity if I sold items?
    By saad3000 in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 12-11-2007, 06:18 PM
  5. [SOLVED] Count number of items in one column that have a value in another?
    By onthefritz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-10-2005, 12:25 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