+ Reply to Thread
Results 1 to 38 of 38

count multiple values in rows & show as quartely figuers

  1. #1
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    count multiple values in rows & show as quartely figuers

    Hello,

    This is a question I posted on Ozgrid, but didn't get a answer as I think my query wasn't clear.

    the original can be found here

    http://www.ozgrid.com/forum/showthread.php?t=196683

    In columns M, N, U, V & Y multiple values are entered separated by a comer.

    from the workbook I need to be able to show Quarterly figures for individual vales In columns M, N, U, V & Y.

    ie how many referrals with "CFLIB" in the first QTR etc

    ie how may Referrals with "ACEDU" in third QTR etc

    I been struggling with this for a few days and would really appreciate some help.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Hi.

    Where are the results to go? Have you already set up a table ready to house them?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    Hi,

    Thanks for your reply.

    the results can go in a separate sheet called summary.

    I haven't set up a table, unfortunately I didn't get that far.

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Ah. I'd be happy to attempt to generate the results for you, but unfortunately I'm not prepared to set up the table to house those results. Besides, a prepared table could also be filled in with a couple of expected results, which would be a real help when working on a solution.

    Regards

  5. #5
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    sorry Im not sure how I should set up the table hence I haven't done it as yet.

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Well, for what do you want results? Surely you know that much?

    Regards

  7. #7
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    I want to results for:

    Colum M (NEEDS)
    Colum N (TARGET GROUPS)
    Column U (INTERNAL REF)
    Column V (EXTERNAL REF)

    and column Y (OUTCOMES)

    I have set up the above tabs in the workbook. but wasn't sure how to affiliate a date/Quarter to them.

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Quote Originally Posted by swk8429 View Post
    how to affiliate a date/Quarter to them.
    Sorry - not sure what this means.

    As I said, if you can set up some tables ready to house the returns, then I'll be happy to give you the formulas that generate those returns. At the moment, however, without those tables and without you providing any manually-calculated results, I have no idea what the results should be, nor where they should go.

    Regards

  9. #9
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    Hi,

    please see updated workbook with tables. I have manually typed in the results to show what I was hoping to achieve.

    I hope it makes more sense now.

    Thanks
    Attached Files Attached Files
    Last edited by swk8429; 09-09-2015 at 06:23 AM.

  10. #10
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Thanks a lot.

    So all results take their data from the REFERRAL RECEIVED sheet?

    And there's only ever one line each for QTR 1, QTR 2, etc.?

    Regards

  11. #11
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37
    Quote Originally Posted by XOR LX View Post
    Thanks a lot.

    So all results take their data from the REFERRAL RECEIVED sheet?

    And there's only ever one line each for QTR 1, QTR 2, etc.?

    Regards

    Appoligies for the delayed reply. Yes all info will come from the referral received sheet.


    Not sure what you mean by the second half of you question.

  12. #12
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Does any solution have to take into account e.g. the Allocation Date (7-Mar-2014 = QTR1, etc.)? Or will QTR1, for example, always be in row 11, QTR2 always in row 12, etc., and so I don't need to worry about looking up dates?

    Regards

  13. #13
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    yes, QTR's will be based on allocation date.

    Thanks

  14. #14
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    And are those dates fixed? Is there always only one row for QTR1, one row for QTR2, etc.?

    Regards

  15. #15
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    the dates of QTR's will be fixed ie Jan-mar =QTR1 Apr-Jun =QTR2

    going back to post 13 I ment referral received date, sorry.

    the rows are dependant on when the referral is received, when ever a new referral is received it is added to the spreadsheet. in most cases the date referrals received will follow on from the previous one.

    Thanks

  16. #16
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Ok, so would it be possible for you to re-upload your workbook with a more realistic example? It's a little difficult at the moment as I'm still unsure on how many different rows there could be for each quarter.

    Regards

  17. #17
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    hi,

    Please see attached, its the most up to date workbook I have. I hope it will help.

    Thanks
    Attached Files Attached Files

  18. #18
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Great. Thanks. Are the dates for each quarter listed anywhere in the workbook? Will need to reference them in the formulas.

    Regards

  19. #19
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    hi,

    no I haven't listed any dates for the QTR's.

    I never got that far.

    Thanks

  20. #20
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    But then how will I tell the formulas which lines belong to which quarter?

    Regards

  21. #21
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    im not sure, do I need to add a worksheet with the dates?

    example

    Q1 January 1 through March 31

    Q2 April 1 through June 30

    Q3 July 1 through September 30

    Q4 October 1 through December 31

  22. #22
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    Morning,

    sorry to be a pain, regarding post #20 how can I add the dates to the worksheet?

    Thanks

  23. #23
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Put them anywhere you like. I suggest a simple three-column table with QTR1 to QTR 4 in the first column, followed by the Start and End Dates for each.

    Regards

  24. #24
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    Thanks for the info.

    please see attached workbook. hopefully this is ok.

    Regards
    Attached Files Attached Files

  25. #25
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Says it's password-protected?

    Regards

  26. #26
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    sorry

    password "access"

  27. #27
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Thanks.

    Re the dates, am I using column C - Allocation Date - to check which quarter each belongs to?

    I just did a quick check in the table against your first expected result in the NEEDS table, i.e. for "ACEDU" in QTR1. You have put 5 as your expected result, though I can only see 3 entries where the Allocation Date is between 01/01/2015 and 31/03/2015 and the column N entry - Needs - contains the string "ACEDU": rows 19, 26 and 29. Can you clarify which 2 I've missed?

    Regards

  28. #28
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    Hi,

    Column J will contain the dates QTR belong to.

    I randomly entered 5 in QTR1 in needs table to show as an example. likewise I also randomly entered other values in the tables.

    Hope that clear up the confusion.

    Thanks

  29. #29
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Ah, I see. Then could I ask for perhaps just three random expected results, manually determined by yourself - maybe one each for NEEDS, OUTCOMES and TARGETS - so that I can compare my formula results against them and so know that I'm on the right track?

    Regards

  30. #30
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    Needs 2014/2015

    results for "acedu"

    qt1 5
    qt2 8
    qt3 1
    qt4 3

    outcomes(the colum qtr belongs to is different its column x sorrry if this complicates things)

    results for “gmw”

    qt1 0
    qt2 1
    qt3 4
    qt4 0

    targets 2014/2015

    results for “lp”

    qt1 3
    qt2 6
    qt3 0
    qt4 1

  31. #31
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Quote Originally Posted by swk8429 View Post
    Needs 2014/2015

    results for "acedu"

    qt1 5
    Ok. I'm a bit worried. I've only checked your very first expected result, but already I don't understand how you get 5.

    I filtered column J - Referral Rec Date - for between 01/01/2015 and 31/03/2015 inclusive (as per your dates given for QTR1) and then filtered column M - Needs - for anything which contains the string "ACEDU" and I only get 4 results, not 5, i.e. rows 19, 26, 29 and 39. Can you clarify which one I've missed?

    Quote Originally Posted by swk8429 View Post
    the colum qtr belongs to is different its column x sorrry if this complicates things
    So which columns do I use for each of the tables: NEEDS, OUTCOMES, TARGETS, REF INT and REF EXT? Column J or column X?

    Regards

  32. #32
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37
    Quote Originally Posted by XOR LX View Post
    Ok. I'm a bit worried. I've only checked your very first expected result, but already I don't understand how you get 5.

    I filtered column J - Referral Rec Date - for between 01/01/2015 and 31/03/2015 inclusive (as per your dates given for QTR1) and then filtered column M - Needs - for anything which contains the string "ACEDU" and I only get 4 results, not 5, i.e. rows 19, 26, 29 and 39. Can you clarify which one I've missed?



    So which columns do I use for each of the tables: NEEDS, OUTCOMES, TARGETS, REF INT and REF EXT? Column J or column X?

    Regards
    Column j will be used for needs targets int ref and ext ref. column x will be used for outcomes.

    The needs, I think the issue may lie In me counting all aced u including thoes from 2014?

  33. #33
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    Hi,

    the figure for QTR 1 is 4.

    I must have counted all entries including those from 2014.

  34. #34
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    The names you gave to the Quarters in the DATES sheet that you set up don't quite match those in your tables, so you'll have to remove the "R" in each (i.e. change "QTR1" to "QT1", etc.) so that they do.

    After that, the formula for cell B5 of the NEEDS sheet would be:

    =SUMPRODUCT(0+('REFERRAL RECEIVED'!$J$11:$J$39>=INDEX(' DATES'!$B$4:$B$7,MATCH(B$4,' DATES'!$A$4:$A$7,0))),0+('REFERRAL RECEIVED'!$J$11:$J$39<=INDEX(' DATES'!$C$4:$C$7,MATCH(B$4,' DATES'!$A$4:$A$7,0))),0+(ISNUMBER(SEARCH(","&$A5&",",","&'REFERRAL RECEIVED'!$M$11:$M$39&","))))

    Copy down and to the right to fill your table (apart from the TOTAL column, of course).

    Note that this formula relies on each of the entries within your delimited lists being separated consistently, i.e. by ",". You currently have some inconsistencies in there, in that some entries are separated by ", " (comma followed by a space) and some by "," (comma but no space), e.g.:

    ISO,LANGB, NTA,NRTPF

    in which it is not clear why LANGB is followed by a comma and a space though the rest are followed by a comma only.

    This will need to be standardised in order for the formula to give correct results.

    Also, sometimes the last entry in a list is followed by a comma; sometimes not, e.g.:

    HOU, LANGB,

    but:

    CFLIB,SUBM

    My formula will not work unless the last entry does not have a comma after it. I can change this if you want, but, either way, you need to be consistent in your data, so that all of your entries follow precisely the same pattern. I would recommend removing all trailing commas, as that it is standard practice when making lists.

    Also note that, although you can of course amend the upper row being referenced in the formula I gave (currently 39) to account for larger datasets, you should be careful not to make it too large (and certainly don't reference entire columns!). Every cell you reference, whether empty or not, will cost extra calculation, so try choosing a suitable upper bound, e.g. 100, which is guaranteed to always be sufficient, though at the same time never too large.

    I will leave it to you to adapt this formula so that it works for the other tables. This will simply require amending the columns being referenced where appropriate.

    Regards

  35. #35
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    Hi, Thanks for the formula & the comprehensive explanation! I have taken your advice and standardised the entry method. there shouldn't be any inconsistencies left.

    the formula seems to be working fine in all the sheets with the exception of the "Need" im getting "FALSE" appear in cells.

    Thanks
    Attached Files Attached Files

  36. #36
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Drag your formula bar down so that it covers about half your window and you'll see that you appear to have pasted the formula in at least three times in every cell, not just once.

    Regards

  37. #37
    Registered User
    Join Date
    12-09-2014
    Location
    uk
    MS-Off Ver
    2013
    Posts
    37

    Re: count multiple values in rows & show as quartely figuers

    lol, thanks for the tip!

    it all seems to be working great!

  38. #38
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: count multiple values in rows & show as quartely figuers

    Great!

    Cheers

+ 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. Count rows meeting multiple criteria of multiple values
    By borcimaeh in forum Excel General
    Replies: 4
    Last Post: 08-24-2014, 02:37 PM
  2. [SOLVED] Using a function to count the number of rows in which multiple values are true
    By jimbowl in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-17-2013, 06:19 PM
  3. Replies: 1
    Last Post: 03-28-2013, 01:48 PM
  4. Replies: 2
    Last Post: 02-06-2013, 04:44 AM
  5. Count number of rows in multiple arrays with identical values
    By Steven Fleck in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-29-2008, 05:59 AM
  6. Count AND show similar values
    By Jexcel in forum Excel General
    Replies: 6
    Last Post: 02-26-2008, 08:50 AM
  7. [SOLVED] Count on multiple values with duplicate rows
    By Carla in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-22-2005, 05:30 PM
  8. How to Count Rows with defined values in multiple columns
    By ryesworld in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-08-2005, 02:35 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