+ Reply to Thread
Results 1 to 9 of 9

How many times a name is written before?

  1. #1
    Registered User
    Join Date
    09-09-2011
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    91

    How many times a name is written before?

    Hi

    I have an Excel sheet where is almost a million rows. I have different names listed in column U. I am trying to find out how many times a name has been written above and i have a following formula: countif($U$1:U1;U2). The problem is that Excel gets stuck because every time it has to go through all the rows from beginning. How can i do this easier?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How many times a name is written before?

    Pivot table?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How many times a name is written before?

    how many times a name has been written above
    above what?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

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

    Re: How many times a name is written before?

    Quote Originally Posted by FDibbins View Post
    above what?
    Here's what they're doing...

    Data Range
    A
    B
    1
    Name1
    1
    2
    Name1
    2
    3
    Name5
    1
    4
    Name1
    3
    5
    Name2
    1
    6
    Name3
    1
    7
    Name4
    1
    8
    Name1
    4
    9
    Name5
    2
    10
    Name1
    5
    11
    ------
    ------


    This formula entered in B1 and copied down:

    =COUNTIF(A$1:A1,A1)

    However, they said they have about 1,000,000 rows of data.

    So, if you copy that formula to 1,000,000 rows this is how many cells you've referenced:

    =SUMPRODUCT(ROW(1:1000000))

    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

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

    Re: How many times a name is written before?

    Quote Originally Posted by Tony Valko View Post
    =SUMPRODUCT(ROW(1:1000000))
    That formula won't work in Excel versions 2003 and earlier!

  6. #6
    Registered User
    Join Date
    09-09-2011
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: How many times a name is written before?

    Thank you for the clearance, that is the problem...

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

    Re: How many times a name is written before?

    Unfortunately, I can't think of a better (more efficient) formula.

    Maybe you could copy the formula down so many rows then convert those to constants and repeat this until you've reached the end of the range.

  8. #8
    Registered User
    Join Date
    09-09-2011
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    91

    Re: How many times a name is written before?

    That is not the only column where i have the same problem, so it gets a bit too heavy to do it manually... If there only would be another way to do it?!!

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How many times a name is written before?

    What's the purpose of the formula, why do you need it?

+ 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. [SOLVED] Where are these written?
    By zanshin777 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-12-2015, 03:31 PM
  2. If a search term can be found 1 time, 2 times 3 times 4 times 5 times
    By excelcandy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2013, 09:57 PM
  3. Is VBA Always written backwards?
    By g48dd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2011, 03:32 PM
  4. Pre-written formula
    By Newton1234 in forum Excel General
    Replies: 2
    Last Post: 06-05-2008, 04:51 AM
  5. [SOLVED] xla written in C#
    By Torben Laursen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-04-2005, 04:05 PM
  6. How do i calculate Written Down value
    By Suresh Gagrani in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-04-2005, 04:06 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