+ Reply to Thread
Results 1 to 12 of 12

Sum up number of times one OR other criteria is present ONCE per row

  1. #1
    Registered User
    Join Date
    11-02-2023
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    4

    Question Sum up number of times one OR other criteria is present ONCE per row

    Hi

    Im reaching out and hoping someone with far more experiance than me can help me out with this issue.


    Have an excel with a few thousand rows, in column Q there is information that has this kind of format;
    "bytasida;nagraflersaker;avslutaMedlemskap;lemyscenter;ByUttrade;V82;$session.params.otherQuestions"
    or
    "lonrattning;lemyscenter;V02;smsSentNo;$session.params.otherQuestions"

    I want to be able to count how many times "avslutaMedlemskap" and "ByUttrade" exists in the Q column, but if it both are present on the same row as in the upper example then it only suppose to only count it once.

    So all in total but only count max once per row.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Sum up number of times one OR other criteria is present ONCE per row

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

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

    Re: Sum up number of times one OR other criteria is present ONCE per row

    Please post a small sample file showing what you have and some expected answers. See yellow banner (top) for guidelines regarding sample files.
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

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

    Re: Sum up number of times one OR other criteria is present ONCE per row

    This will be close to what you want:

    =LET(Z,A2:A20,ROWS(FILTER(Z,(ISNUMBER(SEARCH("A",Z))+ISNUMBER(SEARCH("B",Z))))))

    Change the bit in red to suit your raw data and the bits in green to match the terms you're searching for.
    Attached Files Attached Files

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: Sum up number of times one OR other criteria is present ONCE per row

    Another option: Please try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-02-2023
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    4

    Re: Sum up number of times one OR other criteria is present ONCE per row

    Hey thanks for the welcome.

    Hope this sample is up to standards.
    Attached Files Attached Files

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

    Re: Sum up number of times one OR other criteria is present ONCE per row

    What is the problem with the two suggestions already offered?
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Registered User
    Join Date
    11-02-2023
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    4

    Re: Sum up number of times one OR other criteria is present ONCE per row

    Thanks Glenn and Hans, i have no idea what differentes the formulas you guys did but both works, thanks for the help!

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: Sum up number of times one OR other criteria is present ONCE per row

    You are Welcome!

    Thanks for the feedback and rep . Glad to have helped.

  10. #10
    Registered User
    Join Date
    11-02-2023
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    4

    Question Re: Sum up number of times one OR other criteria is present ONCE per row

    How would i add into the formuals to not count one row if a given value is present. So count if "1" or "2" is there but skip that count if "3" is there?

    EDIT: let me know if i should start another thread instead of continue on this one.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Sum up number of times one OR other criteria is present ONCE per row

    Continuing here is fine, as it's a tweak you need.

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

    Re: Sum up number of times one OR other criteria is present ONCE per row

    A modification of mine, excluding "Q".
    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: 9
    Last Post: 05-03-2020, 03:01 AM
  2. find 1 value in a table and count the number of times another in present
    By Si-Phy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-22-2019, 10:01 PM
  3. Replies: 8
    Last Post: 01-24-2016, 07:17 PM
  4. [SOLVED] Count number times same value is present in a single Row of a larger range.
    By ManinOZ in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 08-25-2015, 05:42 AM
  5. [SOLVED] Lookup and count number of times a number is present???
    By greenfox74 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 12-31-2012, 12:21 PM
  6. Count number of times value is present i area.
    By bendixboogie in forum Excel General
    Replies: 3
    Last Post: 07-06-2011, 01:10 AM
  7. Replies: 2
    Last Post: 10-28-2010, 12:07 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