+ Reply to Thread
Results 1 to 27 of 27

Counting Text based on specific criteria in another column

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Counting Text based on specific criteria in another column

    Hi- So I need to count the number of markets (ex. Flint MI Pittsburgh PA) that are in one column based on whether or not they are assigned to a specific region such as "West", South East etc;

    Example: There are multiple markets listed in each region and I need to count how many markets are in each region without counting duplicate market names. Any help would be greatl

    Column B: Column C:
    Market Name Region

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

    Re: Counting Text based on specific criteria in another column

    Probably a pivot table, can do that job for you.
    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.

  3. #3
    Registered User
    Join Date
    08-21-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Counting Text based on specific criteria in another column

    The problem is that there are duplicates in the market column- Reno may be in there 3 to 4 times. Is there a way to use sumproduct or countif to count how many individual market names are in each region? So if Reno and 9 other markets are in the "West" region I need a formula to say if column C states "West" then count all of the markets in B4:B100 and make sure it doesn't count markets in that array twice

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

    Re: Counting Text based on specific criteria in another column

    Post an excel file, without confidential information.

    Please also add the desired result in your sheet.

  5. #5
    Registered User
    Join Date
    08-21-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Counting Text based on specific criteria in another column

    I've attached a spreadsheet showing what I need. I need the formula to count how many individual markets are in each region without double counting them- So if column B states West for example count only the markets in Column A that are in the West region without counting markets twice.
    Attached Files Attached Files

  6. #6
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Counting Text based on specific criteria in another column

    unique.xlsx
    Please see attched
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  7. #7
    Registered User
    Join Date
    08-21-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Counting Text based on specific criteria in another column

    That works great, thank you very much

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Counting Text based on specific criteria in another column

    I get different results than those you show in the sample file.

    First, change the column headers in F7:I7 to be the actual region.

    Central, North East, South Central, West

    Then, enter this array formula** in F8 and copy across to I8:

    =SUM(IF(FREQUENCY(IF($C8:$C67=F7,MATCH($B8:$B67,$B8:$B67,0)),ROW(B8:B67)-ROW(B8)+1),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    The results I get are:

    Central = 6
    North East = 9
    South Central = 10
    West = 6
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

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

    Re: Counting Text based on specific criteria in another column

    Or with an pivot table.

    I get also differant result.

    See the attached file.
    Attached Files Attached Files

  10. #10
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Counting Text based on specific criteria in another column

    Quote Originally Posted by djreddy View Post
    That works great, thank you very much
    You are welcome.

  11. #11
    Registered User
    Join Date
    08-21-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Counting Text based on specific criteria in another column

    Ok so here is one that may be a litle harder. I need to find formulas to fill in the yellow highlited cells in the attached spreadsheet. I need to count how many stations are in each region depending on which portfolio they are in as well as markets by region based on which portfolio they are in and sum up the cash flow per region based on which portfolio it's in. Any help is greatly appreciated. If someone could just fill in maybe the top region "Central" I can do the rest.

    Thanks!
    Attached Files Attached Files

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

    Re: Counting Text based on specific criteria in another column

    With an pivot table.

    See the attached file.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    08-21-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Counting Text based on specific criteria in another column

    What if I needed the count of the market based on which region but also which portfolio name it falls under..... Please see attached and thank you in advance for any help!
    Attached Files Attached Files

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

    Re: Counting Text based on specific criteria in another column

    With an pivot table.

    See the attached file.

    Please reply.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    08-21-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Counting Text based on specific criteria in another column

    Thank you!

  16. #16
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Counting Text based on specific criteria in another column

    Copy of unique-1.xlsx
    Pivot table do not return unique item(unless you use Excel 2013)
    Plese see attached.

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

    Re: Counting Text based on specific criteria in another column

    @RobertMika

    In that case this pivot table (with an helpcolumn will do).

    See the attached file.
    Attached Files Attached Files

  18. #18
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Counting Text based on specific criteria in another column

    Nice.
    You are right -with some help it can be done.

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

    Re: Counting Text based on specific criteria in another column

    @RobertMika,

    Thanks for the reply and clear information.

  20. #20
    Registered User
    Join Date
    08-21-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Counting Text based on specific criteria in another column

    Thank you both for your help! I really appreciate it!

  21. #21
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Counting Text based on specific criteria in another column

    Quote Originally Posted by djreddy View Post
    Thank you both for your help! I really appreciate it!
    You are welcome.

  22. #22
    Registered User
    Join Date
    08-21-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Counting Text based on specific criteria in another column

    Ok @ Robert- How would I change that formula to count numbers (say cash flows) based on what portfolio and region they were in? I've attached a file as an example and the yellow highlited cells are where I need the clarification. Thank you!

    Thank You
    Attached Files Attached Files

  23. #23
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Counting Text based on specific criteria in another column

    K12:
    =SUM(IF(FREQUENCY(IF($E$8:$E$1006<>"",IF($D$8:$D$1006=K$9,IF($C$8:$C$67=$G12,MATCH("~"&$E$8:$E$1006,$E$8:$E$1006&"",0)))),ROW($E$8:$E$1006)-ROW($B$8)+1),1))
    Drad down and accross

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

    Re: Counting Text based on specific criteria in another column

    With an pivot table and a graph.

    See the attached file.

    Please reply.
    Attached Files Attached Files

  25. #25
    Registered User
    Join Date
    08-21-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Counting Text based on specific criteria in another column

    @ Robert- I tried the formula to sum up the cash flows in column E but I get 0 which isn't correct. I'm not sure if I'm doing something wrong or not, so when you get a chance could you take a look at the attachment and see where I put the formula in and it returned 0 instead of summing up the total cash flows for the STA portfolio in the central region.

    Thank you
    Attached Files Attached Files

  26. #26
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Counting Text based on specific criteria in another column

    Add "STA" in K8

  27. #27
    Registered User
    Join Date
    08-21-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Counting Text based on specific criteria in another column

    @ Robert- I did what you said and put STA in K9 but I am still getting 0 as the sum of cash flows for STA's portfolio in the central region? Not to sure why so if you could look at the attached file and see what I'm doing wrong I'd appreciate it!

    Thanks
    Attached Files Attached Files

+ 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: 7
    Last Post: 06-25-2013, 07:15 PM
  2. Counting Unique text in column B based on a criteria from column a
    By clocmasta in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-18-2013, 06:40 PM
  3. [SOLVED] Counting Occurences in a Range based on Specific Criteria
    By artikyulashun in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-24-2012, 12:23 PM
  4. Counting blanks based on another column's criteria
    By mrdugan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-22-2010, 09:31 AM
  5. Counting a column based on two sets of criteria
    By Cjax in forum Excel General
    Replies: 4
    Last Post: 07-23-2009, 02:40 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