+ Reply to Thread
Results 1 to 7 of 7

Count different collumns

  1. #1
    Forum Contributor
    Join Date
    08-31-2022
    Location
    Swiss
    MS-Off Ver
    365
    Posts
    138

    Count different collumns

    Dear members of the forum,

    I have the following problem:

    I have a huge Excel File (400k entries) in which one collumn contains a location, another one a number, and 4 collumns which contain names (most times 2 names and two collums are empty).
    Now I have to count the numbers in each location, for the name that appears in the first collumn of the names. If there are more than 2 names it should not be counted.

    For example:

    I have location 1 five times, with the numbers (5, 5, 10, 10, 15) and the names (A, B, A, A, B).
    Then I would like to have as a solution:

    Name A in location 1: 25
    Name B in location 1: 20

    Is something like this even possible?
    I have already filtered the file after the locations and could make additional papers for each location, so that i would just have to count the names.

    Thank you in advance!
    Attached Files Attached Files
    Last edited by mrdaave; 08-31-2022 at 05:35 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Count different collumns

    Hi there.

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 non-editable pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet complete with an explanation and some expected results.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Contributor
    Join Date
    08-31-2022
    Location
    Swiss
    MS-Off Ver
    365
    Posts
    138

    Re: Count different collumns

    Hi Glen, thank you in advance for your help!
    I have added a small sample in the first post.
    If it is to difficult to add the "dont count" part its not a big issue

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,773

    Re: Count different collumns

    Try this:

    =SUMIFS($B$2:$B$11,$A$2:$A$11,C17,$C$2:$C$11,C15,$D$2:$D$11,"<>",$E$2:$E$11,"")
    Attached Files Attached Files
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Count different collumns

    Try this, one size fits all for multiple locations, etc. EACH shaded cell = different formula.

    Where included, change the range from : $A$2:$E$11 to the rela range. Then select B14:D17. Drag down until no further entries are seen.

    You may wish to remove my pastel shading!
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    08-31-2022
    Location
    Swiss
    MS-Off Ver
    365
    Posts
    138

    Re: Count different collumns

    Thats amazing - thank you very much for your help! Both Glenn and Ali!
    Ill try it with the large file and hope that i can manage the function
    All the best,
    David

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,773

    Re: Count different collumns

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. ComboBox with two collumns
    By teun-lll in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-22-2020, 09:44 AM
  2. [SOLVED] Formula to count different collumns, error.
    By Mr.Castle in forum Excel General
    Replies: 9
    Last Post: 03-09-2019, 08:21 PM
  3. Excel 2007 : Unlocking Collumns
    By stuart3 in forum Excel General
    Replies: 5
    Last Post: 11-05-2011, 03:53 AM
  4. Loop to run through collumns
    By Glytch in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-18-2008, 10:16 AM
  5. Collumns to text
    By trafficbroker in forum Excel General
    Replies: 4
    Last Post: 09-07-2006, 10:10 AM
  6. Sub Total collumns
    By Darren via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2006, 07:00 PM
  7. [SOLVED] Collumns and rows
    By smintey in forum Excel General
    Replies: 3
    Last Post: 02-15-2005, 02:06 PM

Tags for this Thread

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