Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Find and display only duplicates

I need help please! I have a worksheet with multiple rows/columns of data. I
need to look at the text in each cell in column B (which is already sorted
alphabetically) and if a cell is repeated, to display only the rows in which
the cells in a column are duplicates.

For example below I would only want to to display the two rows that the text
Cory is repeated.
Col A Col B
* Aaron
* Ben
* Cory
* Cory
* David
* Evan

I have not been able to figure this out on my own. Any help is greatly
appreciated.
Thank you,
Sarah

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Find and display only duplicates

Usually people do this will formulas on the worksheet and use Autofilter.

1) in column c put Row 2 and copy down the column

=if(countif($B:$B,B2) 1,true,false)

2) Select column C. On menu Data - Filters - AutoFilter

3) Now select True on AutoFilter to get duplicates

"Sarah_Lund" wrote:

I need help please! I have a worksheet with multiple rows/columns of data. I
need to look at the text in each cell in column B (which is already sorted
alphabetically) and if a cell is repeated, to display only the rows in which
the cells in a column are duplicates.

For example below I would only want to to display the two rows that the text
Cory is repeated.
Col A Col B
* Aaron
* Ben
* Cory
* Cory
* David
* Evan

I have not been able to figure this out on my own. Any help is greatly
appreciated.
Thank you,
Sarah

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default Find and display only duplicates

Hi Sarah,

In C2, enter the following formula:

=COUNTIF($B$2:$B$11,B2)1

and drag the formula down as far as needed.

Now autofilter columns A:C of your data,
using a criterion of true for the third
column of the autofilter.

Now only data rows will be visible for
which there is a duplication of column C
data

---
Regards.
Norman


"Sarah_Lund" wrote in message
...
I need help please! I have a worksheet with multiple rows/columns of data.
I
need to look at the text in each cell in column B (which is already sorted
alphabetically) and if a cell is repeated, to display only the rows in
which
the cells in a column are duplicates.

For example below I would only want to to display the two rows that the
text
Cory is repeated.
Col A Col B
* Aaron
* Ben
* Cory
* Cory
* David
* Evan

I have not been able to figure this out on my own. Any help is greatly
appreciated.
Thank you,
Sarah


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,118
Default Find and display only duplicates

Here's one approach...

With the Col_B sorted list beginning in B10
and B10 as the column heading (eg name)

A1: DupeTest
A2: =OR(B11=B10,B11=B12)

Select from B10 down through the last data cell of Col_B

From the Excel Main Menu:
<data<filter<advanced filter
List Range: (already selected)
Criteria Range: $A$1:$A$2
Click [OK]

Only the contiguous duplicate values will be displayed.

Is that something you can work with?
Post back if you have more questions.
-------------------

Regards,

Ron
Microsoft MVP - Excel

"Sarah_Lund" wrote in message
...
I need help please! I have a worksheet with multiple rows/columns of data.
I
need to look at the text in each cell in column B (which is already sorted
alphabetically) and if a cell is repeated, to display only the rows in
which
the cells in a column are duplicates.

For example below I would only want to to display the two rows that the
text
Cory is repeated.
Col A Col B
* Aaron
* Ben
* Cory
* Cory
* David
* Evan

I have not been able to figure this out on my own. Any help is greatly
appreciated.
Thank you,
Sarah

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Find and display only duplicates

This works great. Is there any way to do this with a macro so the enduser
doesn't have to do these steps each time they get an updated excel file?

Thank you,
Sarah

"Norman Jones" wrote:

Hi Sarah,

In C2, enter the following formula:

=COUNTIF($B$2:$B$11,B2)1

and drag the formula down as far as needed.

Now autofilter columns A:C of your data,
using a criterion of true for the third
column of the autofilter.

Now only data rows will be visible for
which there is a duplication of column C
data

---
Regards.
Norman


"Sarah_Lund" wrote in message
...
I need help please! I have a worksheet with multiple rows/columns of data.
I
need to look at the text in each cell in column B (which is already sorted
alphabetically) and if a cell is repeated, to display only the rows in
which
the cells in a column are duplicates.

For example below I would only want to to display the two rows that the
text
Cory is repeated.
Col A Col B
* Aaron
* Ben
* Cory
* Cory
* David
* Evan

I have not been able to figure this out on my own. Any help is greatly
appreciated.
Thank you,
Sarah




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default Find and display only duplicates

Hi Sarah,

If you need to automate this, turn on the
macro recorder and perform the necessary
operations manually. This will provide you
with code which may be edited to afford
more generic application.

If you experience problems in editing the
recorder code, post back with the
problematic code.



---
Regards.
Norman

"Sarah_Lund" wrote in message
...
This works great. Is there any way to do this with a macro so the enduser
doesn't have to do these steps each time they get an updated excel file?

Thank you,
Sarah

"Norman Jones" wrote:

Hi Sarah,

In C2, enter the following formula:

=COUNTIF($B$2:$B$11,B2)1

and drag the formula down as far as needed.

Now autofilter columns A:C of your data,
using a criterion of true for the third
column of the autofilter.

Now only data rows will be visible for
which there is a duplication of column C
data

---
Regards.
Norman


"Sarah_Lund" wrote in message
...
I need help please! I have a worksheet with multiple rows/columns of
data.
I
need to look at the text in each cell in column B (which is already
sorted
alphabetically) and if a cell is repeated, to display only the rows in
which
the cells in a column are duplicates.

For example below I would only want to to display the two rows that the
text
Cory is repeated.
Col A Col B
* Aaron
* Ben
* Cory
* Cory
* David
* Evan

I have not been able to figure this out on my own. Any help is greatly
appreciated.
Thank you,
Sarah



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Find and display only duplicates

This worked exactly how I wanted.
Thank you!
Sarah

"Norman Jones" wrote:

Hi Sarah,

If you need to automate this, turn on the
macro recorder and perform the necessary
operations manually. This will provide you
with code which may be edited to afford
more generic application.

If you experience problems in editing the
recorder code, post back with the
problematic code.



---
Regards.
Norman

"Sarah_Lund" wrote in message
...
This works great. Is there any way to do this with a macro so the enduser
doesn't have to do these steps each time they get an updated excel file?

Thank you,
Sarah

"Norman Jones" wrote:

Hi Sarah,

In C2, enter the following formula:

=COUNTIF($B$2:$B$11,B2)1

and drag the formula down as far as needed.

Now autofilter columns A:C of your data,
using a criterion of true for the third
column of the autofilter.

Now only data rows will be visible for
which there is a duplication of column C
data

---
Regards.
Norman


"Sarah_Lund" wrote in message
...
I need help please! I have a worksheet with multiple rows/columns of
data.
I
need to look at the text in each cell in column B (which is already
sorted
alphabetically) and if a cell is repeated, to display only the rows in
which
the cells in a column are duplicates.

For example below I would only want to to display the two rows that the
text
Cory is repeated.
Col A Col B
* Aaron
* Ben
* Cory
* Cory
* David
* Evan

I have not been able to figure this out on my own. Any help is greatly
appreciated.
Thank you,
Sarah



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
Find Duplicates rap43 Excel Discussion (Misc queries) 4 October 22nd 09 05:01 PM
Display all values in other cells with no duplicates Shu of AZ Excel Discussion (Misc queries) 0 November 9th 07 01:00 AM
Display a 1 for the first of duplicates noelle Excel Worksheet Functions 4 October 4th 07 03:10 PM
Duplicate value are removed, but how can i display in tx8 the amount of duplicates there are ? [email protected] Excel Programming 0 March 1st 07 10:14 AM
Find duplicates ljCharlie[_5_] Excel Programming 7 May 11th 04 12:56 PM


All times are GMT +1. The time now is 12:22 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"