+ Reply to Thread
Results 1 to 14 of 14

Need a forumula for counting a list of servers, but not the duplicates

Hybrid View

  1. #1
    Registered User
    Join Date
    11-01-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    14

    Exclamation Need a forumula for counting a list of servers, but not the duplicates

    Hi all,
    I have a tight deadline and was wondering if anyone knows how to write a forumula for me.
    I have a spreadsheet containing 62,293 lines of data. In column A I have the names of servers. I need a count of these servers, but some are duplicates. Obviously I don't want to count them. Is there a simple way to do this? And, yes I have filtered this sheet to only show data for the month of September, but that shouldn't make any difference.

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

    Re: Need a forumula for counting a list of servers, but not the duplicates

    Try this array formula =SUM(IF(MATCH(List1, List1, 0)>=(ROW(List1)-MIN(ROW(List1))+1), 1, 0)) where your range is named List1

  3. #3
    Registered User
    Join Date
    11-01-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Need a forumula for counting a list of servers, but not the duplicates

    Pepe,
    So I tried your formula using the following because my range is A2:A62293:
    =SUM(IF(MATCH(A2:A62293, A2:A62293, 0)>=(ROW(A2:A62293)-MIN(ROW(A2:A62293))+1), 1, 0))

    I get the following error: #VALUE!

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

    Re: Need a forumula for counting a list of servers, but not the duplicates

    Quote Originally Posted by Stormy4757 View Post
    Pepe,
    So I tried your formula using the following because my range is A2:A62293:
    =SUM(IF(MATCH(A2:A62293, A2:A62293, 0)>=(ROW(A2:A62293)-MIN(ROW(A2:A62293))+1), 1, 0))

    I get the following error: #VALUE!
    Did you commit with Ctrl+Shift+Enter ?

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,720

    Re: Need a forumula for counting a list of servers, but not the duplicates

    On the ribbon click on Data, there is an icon for remove duplicates. Use this and then you will have your count of rows. If you need to keep the original data and the new data, save as a new file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Registered User
    Join Date
    11-01-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Need a forumula for counting a list of servers, but not the duplicates

    Alan, I tried your suggestion, but the remove duplicates is greyed out.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,720

    Re: Need a forumula for counting a list of servers, but not the duplicates

    Suggest you post a sample worksheet for analysis.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    Edit: Question: Did you have multiple worksheets selected? Need to only have a single worksheet selected.
    Last edited by alansidman; 11-01-2013 at 11:03 AM.

  8. #8
    Registered User
    Join Date
    11-01-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Need a forumula for counting a list of servers, but not the duplicates

    sorry Alan, but I am not comfortable uploading the spreadsheet. I am only using one worksheet.

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,720

    Re: Need a forumula for counting a list of servers, but not the duplicates

    In that case, I suggest you google why the Icon is greyed out. I apologize, but I cannot offer any further assistance based upon what you have provided.

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Need a forumula for counting a list of servers, but not the duplicates

    also did you not see that it is an array formula..did you confirm with ctrl+shift+enter
    you could also try this normally entered formula
    =SUMPRODUCT((A1:A62293<>"")/COUNTIF(A1:A62293,A1:A62293&""))
    Last edited by martindwilson; 11-01-2013 at 11:46 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  11. #11
    Registered User
    Join Date
    12-21-2011
    Location
    EU here and there
    MS-Off Ver
    Excel 2019
    Posts
    70

    Re: Need a forumula for counting a list of servers, but not the duplicates

    Check my thread from yesterday - I got help doing exactly what you seem to want to do.

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

    Re: Need a forumula for counting a list of servers, but not the duplicates


  13. #13
    Registered User
    Join Date
    11-01-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Need a forumula for counting a list of servers, but not the duplicates

    Sorry Pepe, my bad!

  14. #14
    Registered User
    Join Date
    11-01-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Need a forumula for counting a list of servers, but not the duplicates

    I have solved this issue using "Remove Duplicates". It was greyed out because the spreadsheet was being shared. After I turned that off, I was able to use this function. This was the quickest way to get my answer. I will, however, try the other suggestion metioned by Pepe when I get time. Thank you everyone for your efforts in helping me.

+ 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: 2
    Last Post: 08-28-2012, 10:41 PM
  2. Forumula for address list - Really struggling with this one
    By thomasmarc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2011, 09:00 PM
  3. Replies: 13
    Last Post: 03-14-2011, 03:50 PM
  4. How to lock a list of servers in excel sheet
    By hvardhan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-16-2010, 09:19 AM
  5. counting cells with data without counting duplicates
    By labettis in forum Excel General
    Replies: 2
    Last Post: 11-05-2007, 12:10 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