+ Reply to Thread
Results 1 to 5 of 5

Sumif and if duplicate only count onw

  1. #1
    Registered User
    Join Date
    11-07-2022
    Location
    Hong Kong
    MS-Off Ver
    2013
    Posts
    1

    Sumif and if duplicate only count onw

    Hi All,

    Just trying to use the sumif or other possible formula to count the numbers of the COL 1 hostname, however there are some duplicate hostname occur and i only want to count as 1. the expected result as Col B, any advice appreciate

    Col A Col B
    Hostname Number of Host
    Hostname 1 5
    Hostname 1
    Hostname 1
    Hostname 2
    Hostname 3
    Hostname 3
    Hostname 3
    Hostname 3
    Hostname 4
    Hostname 5
    Hostname 5

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,197

    Re: Sumif and if duplicate only count onw

    Administrative Note:

    Welcome to the forum.

    Is your forum profile showing the Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,197

    Re: Sumif and if duplicate only count onw

    For 2021 & 365:

    =COUNTA(UNIQUE(A2:A12))

    For 2019 and earlier:

    =SUMPRODUCT(1/COUNTIF(A2:A12,A2:A12))

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,197

    Re: Sumif and if duplicate only count onw

    If you want to count a list that may have blanks:

    =COUNTA(UNIQUE(TOCOL(A:A,1)))

    or:

    =SUMPRODUCT(1/COUNTIF(A:A,A:A&""))-1

    array entered.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,197

    Re: Sumif and if duplicate only count onw

    Seen - gone - no reply, not even a 'thank you'.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

+ 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: 11
    Last Post: 08-18-2021, 08:31 AM
  2. [SOLVED] excel formula to count unique and only count duplicate value once
    By mytran in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 10-29-2020, 03:41 PM
  3. Replies: 2
    Last Post: 03-03-2018, 05:00 AM
  4. Replies: 1
    Last Post: 05-19-2017, 07:37 AM
  5. [SOLVED] Count then Delete Duplicate Values and put count next to now unique value
    By flipjarg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2014, 04:22 PM
  6. [SOLVED] Sumif duplicate value
    By Jeffrey Ting in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-06-2012, 09:07 PM
  7. SUMIF duplicate
    By magman1984 in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 08-31-2011, 10:18 AM

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