Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Display a 1 for the first of duplicates

I have a list of records that have many duplicates. I need a formula that I
can use in the adjacent column to show a 1 for the first instance of a
duplicate and a 0 for any others. The list is sorted so all dupes are
together.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Display a 1 for the first of duplicates

Try this formula:
=--(MATCH(A2,A:A,0)=ROW(A2))
and drag it down as required!

Regards,
Stefi


€˛noelle€¯ ezt Ć*rta:

I have a list of records that have many duplicates. I need a formula that I
can use in the adjacent column to show a 1 for the first instance of a
duplicate and a 0 for any others. The list is sorted so all dupes are
together.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 53
Default Display a 1 for the first of duplicates

Use this formula in cell B3:

=IF(COUNTIF(C$3:C3, C3)=2, 1, 0)
Let me know if it works.

"noelle" wrote:

I have a list of records that have many duplicates. I need a formula that I
can use in the adjacent column to show a 1 for the first instance of a
duplicate and a 0 for any others. The list is sorted so all dupes are
together.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 31
Default Display a 1 for the first of duplicates

Note that the first solution above will flag the first occurence of each
value (duplicate or otherwise); the second solution will flag the second
occurence (=the first duplicate, literally). Choose the one that actually
matches your need.

--
Adam Vero
MCP, MOS Master, MLSS, CWNA
http://veroblog.wordpress.com
http://www.meteorit.co.uk


"Excel_Learner" wrote:

Use this formula in cell B3:

=IF(COUNTIF(C$3:C3, C3)=2, 1, 0)
Let me know if it works.

"noelle" wrote:

I have a list of records that have many duplicates. I need a formula that I
can use in the adjacent column to show a 1 for the first instance of a
duplicate and a 0 for any others. The list is sorted so all dupes are
together.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Display a 1 for the first of duplicates

Great, thanks. That worked!

Would you mind explaining the components so I understand how it works? It's
really been bugging me that I can't figure this out!

Thanks again.

"Stefi" wrote:

Try this formula:
=--(MATCH(A2,A:A,0)=ROW(A2))
and drag it down as required!

Regards,
Stefi


€˛noelle€¯ ezt Ć*rta:

I have a list of records that have many duplicates. I need a formula that I
can use in the adjacent column to show a 1 for the first instance of a
duplicate and a 0 for any others. The list is sorted so all dupes are
together.

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
How to display remaining txt file which overflowed MsgBox display? EagleOne Excel Discussion (Misc queries) 1 November 2nd 06 01:10 PM
Display every 3rd category name but still display latest month maryj Charts and Charting in Excel 1 September 24th 06 09:05 PM
Can I display an Excel chart as my screensaver display? Burke Charts and Charting in Excel 0 August 1st 06 07:01 PM
Duplicates Krissie C Excel Discussion (Misc queries) 3 November 16th 05 01:17 PM
Numbers display as decimal, i.e. enter 123 display 1.23 IGH219 Setting up and Configuration of Excel 1 June 16th 05 09:16 PM


All times are GMT +1. The time now is 04:18 PM.

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"