+ Reply to Thread
Results 1 to 13 of 13

Counts of Text Where You Don't Know the Text Values

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Counts of Text Where You Don't Know the Text Values

    Hi,

    I have a question regarding counting cells where you don't know the values you need to count. If you look at the attached JPG, the data in the table A1:I7 is generated automatically. It shows projects that staff members are working on in the morning and afternoon in any given week.

    ExcelCounts.jpg

    My question is how can I get the unique project names to display in cells A11, A12, A13 etc? I don't know what the projects are before I get the data, so I need a formula that says get me the names of the unique projects in the range B3:I7 and then give me a count for each of these unique projects. The data I have shown in the JPG in cells A10:B16 is hard written to show what I am looking for.

    Thanks in advance for any help.

    Cheers,
    Steve

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Counts of Text Where You Don't Know the Text Values

    Try in B11 copied down...

    =COUNTIF($B$3:$I$7,A11)

    For future reference, a picture does not work as well for testing purposes as the worksheet itself...
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Counts of Text Where You Don't Know the Text Values

    Hi Jeff,

    Thanks for the quick feedback, but my question really is how can I get the spreadsheet to determine the unique projects for me, and then give me the count. In a real world example there could be different projects in every slot, or the same project in every slot. Once I get the data dump which is in B3:I7 I want the xls to then tell me the names of all the unique projects and the number of times they are represented.

    I have attached the working example spreadsheet - hope that helps?

    ProjectExample.xlsx

    Thanks,
    Steve

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Counts of Text Where You Don't Know the Text Values

    Hi Steve,

    vba is the short answer... a complex formula is the long answer... at least for me

    Are you up for a vba solution?

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Counts of Text Where You Don't Know the Text Values

    Hi Steve,

    You could also help us by showing a before and after, after all, it's your data and the results you want only you understand.

  6. #6
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Counts of Text Where You Don't Know the Text Values

    Hi,

    Attached is the before and after of what I am hoping to get. Hope that can shed some more light?

    ProjectExample.xlsx

    If a VBA script is the only (or best) way then I am open to that - although my VBA skills are rudimentary at best!

    Thanks,
    Steve

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Counts of Text Where You Don't Know the Text Values

    I am lost. The file you just posted has 14 for Support using the Countif, so what else do you expect?

    Are you looking for AMs and PMs?

  8. #8
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Counts of Text Where You Don't Know the Text Values

    Hi Jeff,

    Sorry I am obviously not explaining myself very well! Let me go from the top. I have a system at work where I can export weekly reports that show me staff member names and the projects they are working on Monday to Friday in the AM and PM. This is what you see if the XLS in cells A1:I7.

    Once I have this output, I then want the spreadsheet to list all the unique projects that are in cells B3:I7, and then count how many times they are in cells B3:I7.

    I think I am OK getting the counts, but the problem is how do I get the spreadsheet to list the unique projects in cell A11 down?

    Hope that makes more sense?

    Thanks,
    Steve

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Counts of Text Where You Don't Know the Text Values

    Use a Pivot table, quick and easy:

    http://screencast.com/t/fHBO1Yko
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  10. #10
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Counts of Text Where You Don't Know the Text Values

    Hi Jerry,

    Thanks for the Pivot Table suggestion and video to show it, I have now added that and it works like a dream!

    One further question is can the values in the pivot table auto update if I amend the values in B3:I7? The reason I ask is that i wll drop data into these cells quite regulalry so would then like a quick way to update the results in the pivot table, without having to create a pivot every time?

    Cheers,
    Steve

  11. #11
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Counts of Text Where You Don't Know the Text Values

    Hi Jerry, sorry ignore me, just found the Refresh function when I right click the data in the pivot table!
    Cheers,
    Steve

  12. #12
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Counts of Text Where You Don't Know the Text Values

    If you want a purely formula-driven approach, then this site:

    http://www.get-digital-help.com/2009...rray-formulas/

    shows how you can get a unique list from multiple columns of data.

    Hope this helps.

    Pete

  13. #13
    Registered User
    Join Date
    11-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Counts of Text Where You Don't Know the Text Values

    Hi Pete, thanks for that. Will take a look at the forumula option as well. Appreciate your help.

    Steve

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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