Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 110
Default I need a macro instead of a formula.



"Jman" wrote: I need a macro that counts duplicates names only.

I have used this formula and it works well until after 1000 cells down it
causes excel to freeze.


=SUMPRODUCT((A1:A65530<"")/COUNTIF(A1:A65530,A1:A65530&""))-SUMPRODUCT(--(COUNTIF(A1:A65530,A1:A65530)=1))

John Doe
Bill Gates
Bill Gates
Chris Max
Chris Max
Chris Max

I want the end result to be = 2 repeats.


Is there a macro that does the same thing?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default I need a macro instead of a formula.

You don't need a macro; you need a Pivot Table. Say the data is:

item
Curly
Bill Gates
Moe
Bill Gates
Trevor
David
Chris Max
John Doe
Chris Max
Max
joe
Wilber
joe
Chris Max
Larry
joe
Victor

A variation of your formula:

=SUMPRODUCT((A2:A101<"")/COUNTIF(A2:A101,A2:A101&""))-SUMPRODUCT(--(COUNTIF(A2:A101,A2:A101)=1))

will produce 3 as there are three names that have repeats.


A Pivot Table of the same data produces:

Count of item
item Total
Bill Gates 2
Chris Max 3
Curly 1
David 1
joe 3
John Doe 1
Larry 1
Max 1
Moe 1
Trevor 1
Victor 1
Wilber 1
Grand Total 17

Now you see the items that are repeated and how many times they are repeated.


--
Gary''s Student - gsnu200776


"Jman" wrote:



"Jman" wrote: I need a macro that counts duplicates names only.

I have used this formula and it works well until after 1000 cells down it
causes excel to freeze.


=SUMPRODUCT((A1:A65530<"")/COUNTIF(A1:A65530,A1:A65530&""))-SUMPRODUCT(--(COUNTIF(A1:A65530,A1:A65530)=1))

John Doe
Bill Gates
Bill Gates
Chris Max
Chris Max
Chris Max

I want the end result to be = 2 repeats.


Is there a macro that does the same thing?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 110
Default I need a macro instead of a formula.

How can i get the pivot table example you gave me.. to equal Grand Total =3
Since only 3 clients came in more than once, instead of the total is giving
me now 17.

I dont want the names that egual 1 visit to be counted towards the grand
total. only the repeats.



"Gary''s Student" wrote:

You don't need a macro; you need a Pivot Table. Say the data is:

item
Curly
Bill Gates
Moe
Bill Gates
Trevor
David
Chris Max
John Doe
Chris Max
Max
joe
Wilber
joe
Chris Max
Larry
joe
Victor

A variation of your formula:

=SUMPRODUCT((A2:A101<"")/COUNTIF(A2:A101,A2:A101&""))-SUMPRODUCT(--(COUNTIF(A2:A101,A2:A101)=1))

will produce 3 as there are three names that have repeats.


A Pivot Table of the same data produces:

Count of item
item Total
Bill Gates 2
Chris Max 3
Curly 1
David 1
joe 3
John Doe1
Larry 1
Max 1
Moe 1
Trevor 1
Victor 1
Wilber 1
Grand Total 17

Now you see the items that are repeated and how many times they are repeated.


--
Gary''s Student - gsnu200776


"Jman" wrote:



"Jman" wrote: I need a macro that counts duplicates names only.

I have used this formula and it works well until after 1000 cells down it
causes excel to freeze.


=SUMPRODUCT((A1:A65530<"")/COUNTIF(A1:A65530,A1:A65530&""))-SUMPRODUCT(--(COUNTIF(A1:A65530,A1:A65530)=1))

John Doe
Bill Gates
Bill Gates
Chris Max
Chris Max
Chris Max

I want the end result to be = 2 repeats.


Is there a macro that does the same thing?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula or Macro Meadowlark Excel Discussion (Misc queries) 5 February 27th 08 03:59 PM
Formula or Macro M Hebert Excel Discussion (Misc queries) 2 June 27th 07 01:24 PM
Need formula or Macro Help Atomic Excel Worksheet Functions 1 April 26th 07 05:38 PM
Macro Formula for Max value El Bee Excel Worksheet Functions 4 December 8th 06 04:08 PM
Formula / Macro Help BSLAUTOMATION Excel Discussion (Misc queries) 3 August 31st 05 08:09 PM


All times are GMT +1. The time now is 10:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"