+ Reply to Thread
Results 1 to 18 of 18

Count if one number of a concatenated cell is greater than 0

  1. #1
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    22

    Count if one number of a concatenated cell is greater than 0

    Hi,

    I'm building a tool that has a column that concatenates funding applications as such:

    x pending; y approved; z denied (with x,y,z representing the real number values)

    This is replicated in hundreds of rows, but I need a way to count the unique number of rows, whose concatenated cell has a y value greater than 0. Is this possible?

    This is the formula in the concatenated cell:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Any help would be so truly appreciated!

    Thanks!

  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 if one number of a concatenated cell is greater than 0

    Hi,

    Forgive me if I've misunderstood, but why would the count of rows whose concatenated cell has a y value greater than 0 be different from the count of rows whose count of "Approved" is greater than 0?

    Regards
    Click * below if this answer helped

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

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

    Re: Count if one number of a concatenated cell is greater than 0

    Assuming your first concatenation is in Cell A1, put this formula in another cell.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Change 'A1' to your needs.

    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.

  4. #4
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Count if one number of a concatenated cell is greater than 0

    Oh sorry, I should have explained. The cell is concatenating values from about 50 different cells in the same row, so it is counting the number of applicants in that row (row 5) that have been approved/pending/denied, from cells that are further down the row. This would result in that cell putting out a value like:

    14 Pending; 18 Approved; 9 Denied

    So if there is a way to count the number of rows that contain at least one 'Approved' then that would work too. Hope that makes sense; I can't put a sample up because it's confidential but I also can't seem to make the formula work on a different document.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Count if one number of a concatenated cell is greater than 0

    so you need to count the range where your concatenate formula gets it's Approved results from for >0

    I think you need to post a sample book.

  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 if one number of a concatenated cell is greater than 0

    Perhaps, assuming your range extends from M5:BX55, this array formula:

    =SUM(--(MMULT((--($M$5:$BX$55="Approved")),TRANSPOSE(COLUMN($M$5:$BX$55)^0))>0))

    Regards

  7. #7
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Count if one number of a concatenated cell is greater than 0

    OK so here is a sample. I need to count the total number of rows whose cell in the B column has an approved number >0. I think the other formulas provided on this thread work really well for individual rows, but not as a summing/counting function.
    Last edited by te31; 10-29-2013 at 02:19 PM.

  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 if one number of a concatenated cell is greater than 0

    Did you try the formula I posted? Works fine for me.

    Here you simply change the range reference:

    =SUM(--(MMULT((--($C$5:$E$17="Approved")),TRANSPOSE(COLUMN($C$5:$E$17)^0))>0))

    There's no need to do any complicated in-string searching of the concatenated cells.

    Regards

  9. #9
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Count if one number of a concatenated cell is greater than 0

    Hey XOR,

    I just copy pasted that formula into the sample worksheet, but it comes up with a value error.
    Attached Files Attached Files
    Last edited by te31; 10-29-2013 at 02:21 PM.

  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 if one number of a concatenated cell is greater than 0

    Please re-read post #6.

    You're not the first (and certainly won't be the last!) to miss the bit about about this being an array formula.

    (I used to have a footnote in large, emboldened fonts in such cases, but people still always missed it!! So now I just settle for emboldening a single word and trust that people will realise it's important. Apologies, since this also is clearly not working!)

    Regards

  11. #11
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Count if one number of a concatenated cell is greater than 0

    Oops I'm so sorry for that. Yes it works. That must get annoying. Thank you!!

  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 if one number of a concatenated cell is greater than 0

    I just need to come up with a new strategy to get people's attention (and without going too over-the-top!)

    And you're welcome!

  13. #13
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Count if one number of a concatenated cell is greater than 0

    Another simple way to do this is by creating a helper column. Please see the attached sheet.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

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

    Re: Count if one number of a concatenated cell is greater than 0

    I have fairly good success using this template:

    This array formula** ....

    Some array formula here

    ** 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 array enter explanation is one of my "canned replies" so I don't have to type or copy/paste it every time.

    I think you need so many posts/rep points to get canned replies. If you have them they're located at:

    User CP, in left side pane, all the way at the bottom in Miscellaneous>Your Canned Replies.

    You can have up to 8 personal canned replies. Nice feature especially if you're a "gimp typer" like me!
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

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

    Re: Count if one number of a concatenated cell is greater than 0

    Thanks, Tony. Appreciated.

    Looks like I don't yet have the privilege, though!! Perhaps in the meantime I could just pinch yours and paste it in everytime?

    Cheers

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

    Re: Count if one number of a concatenated cell is greater than 0

    Quote Originally Posted by XOR LX View Post
    Perhaps in the meantime I could just pinch yours and paste it in everytime?
    Absolutely.

    And, for those occasions when the message doesn't work, I use this more detailed message as a follow up:

    Array formulas are entered differently than a regular formula. After you type in a regular formula you hit the ENTER key. With an array formula you *must* use a combination of keys. Those keys are the CTRL key, the SHIFT key and the ENTER key. That is, hold down both the CTRL key and the SHIFT key then hit the ENTER key.

    When done properly Excel will enclose the formula in squiggly brackets { }. You can't just type these brackets in, you *must* use the key combo to produce them. Also, anytime you edit an array formula it *must* be re-entered as an array using the key combo.

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

    Re: Count if one number of a concatenated cell is greater than 0

    Yes, I would find it hard to believe that anyone could come back to you with a "What's an array formula?"-type question after seeing that!

    I think I may have to do something as it's actually becoming something of an issue. Not that I don't mind explaining it (again and again) but it makes sense if you can at least reduce the number of occasions on which you have to do so.

    And I'll maybe chase the admin team to see if I'm getting close to that magic 'automatic feedback' status yet!

    Thanks a lot

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

    Re: Count if one number of a concatenated cell is greater than 0

    You're welcome!

+ 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 ID numbers - Cut & Paste any greater than a certain number
    By WCE_123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2013, 07:30 PM
  2. Count number of dates in a range by using greater or less than
    By sclasen24 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2013, 01:29 PM
  3. [SOLVED] How not to count text when looking for a number greater than
    By neeners36 in forum Excel General
    Replies: 5
    Last Post: 03-30-2012, 06:07 PM
  4. Replies: 6
    Last Post: 02-24-2012, 01:15 PM
  5. count a number that is less than a number and greater than a numbe
    By Dale in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-19-2005, 01:20 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