Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 190
Default retrieve duplicate values from arrays

My spreadsheet contains the following:
A B C D
1 123 xxxx x1x1 12345
2 101 yyyy y1y1 23456
3 123 zzzz z1z1 34567
4 215 aaaa a1a1 89100

In another spreadsheet, I want to get all data using column A as the
criteria including those with duplicate values and not just the first one. In
effect I want my other worksheet to show:
A B C D
1 123 xxxx x1x1 12345
2 123 zzzz z1z1 34567


  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default retrieve duplicate values from arrays

One way using non array formulas ..

Assume source data in Sheet1's cols A to D,
from row1 down, with key col A

In Sheet2,

Put in A1:
=IF(Sheet1!A1="","",IF(COUNTIF(Sheet1!A:A,Sheet1!A 1)1,ROW(),""))

Put in B1:
=IF(ROW()COUNT($A:$A),"",INDEX(Sheet1!A:A,SMALL($ A:$A,ROW())))
Copy B1 across to E1. Select A1:E1, copy down to cover the max expected
extemt of data in Sheet1's key col A. Hide away col A. Cols B to E will
return the required results, all neatly bunched at the top.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Mary" wrote:
My spreadsheet contains the following:
A B C D
1 123 xxxx x1x1 12345
2 101 yyyy y1y1 23456
3 123 zzzz z1z1 34567
4 215 aaaa a1a1 89100

In another spreadsheet, I want to get all data using column A as the
criteria including those with duplicate values and not just the first one. In
effect I want my other worksheet to show:
A B C D
1 123 xxxx x1x1 12345
2 123 zzzz z1z1 34567


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 190
Default retrieve duplicate values from arrays

I tried the formula but it doesn't seem to work. I still get the same row of
data over and over again. What comes out is:

A B C D E
1 4 123 xxxx x1x1 12345
2 5 123 xxxx x1x1 12345

I would really like sheet 2 to look like this:

A B C D
1 101 yyyy y1y1 23456
2 123 xxxx x1x1 12345
3 123 zzzz z1z1 34567
4 215 aaaa a1a1 89100
5 and so on...

Could you please explain further the formulas?

"Max" wrote:

One way using non array formulas ..

Assume source data in Sheet1's cols A to D,
from row1 down, with key col A

In Sheet2,

Put in A1:
=IF(Sheet1!A1="","",IF(COUNTIF(Sheet1!A:A,Sheet1!A 1)1,ROW(),""))

Put in B1:
=IF(ROW()COUNT($A:$A),"",INDEX(Sheet1!A:A,SMALL($ A:$A,ROW())))
Copy B1 across to E1. Select A1:E1, copy down to cover the max expected
extemt of data in Sheet1's key col A. Hide away col A. Cols B to E will
return the required results, all neatly bunched at the top.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Mary" wrote:
My spreadsheet contains the following:
A B C D
1 123 xxxx x1x1 12345
2 101 yyyy y1y1 23456
3 123 zzzz z1z1 34567
4 215 aaaa a1a1 89100

In another spreadsheet, I want to get all data using column A as the
criteria including those with duplicate values and not just the first one. In
effect I want my other worksheet to show:
A B C D
1 123 xxxx x1x1 12345
2 123 zzzz z1z1 34567


  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default retrieve duplicate values from arrays

Not sure what's happening but I think you've somehow got things a
little mixed up here <g. Kindly re-read your original posting, what
you indicated there as the source data and what you wanted as the
results. The earlier suggestion should have worked and returned
exactly the results that you wanted.

Here's a working sample which illustrates the earlier suggestion:
http://www.savefile.com/files/520223
Retrieve dup values from_array.xls

Take a look at the sample first, then let me know here how it goes ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
On Feb 26, 12:44 pm, Mary wrote:
I tried the formula but it doesn't seem to work. I still get the same row of
data over and over again. What comes out is:

A B C D E
1 4 123 xxxx x1x1 12345
2 5 123 xxxx x1x1 12345

I would really like sheet 2 to look like this:

A B C D
1 101 yyyy y1y1 23456
2 123 xxxx x1x1 12345
3 123 zzzz z1z1 34567
4 215 aaaa a1a1 89100
5 and so on...

Could you please explain further the formulas?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 190
Default retrieve duplicate values from arrays

Sorry for the confusion. What I am aiming for is to organise the data in such
a way that they are sorted according to a key criteria (according to number
ie 101, 123, 215 and so on) and if it is duplicated then it will list all the
data with the same key criteria.

"Max" wrote:

Not sure what's happening but I think you've somehow got things a
little mixed up here <g. Kindly re-read your original posting, what
you indicated there as the source data and what you wanted as the
results. The earlier suggestion should have worked and returned
exactly the results that you wanted.

Here's a working sample which illustrates the earlier suggestion:
http://www.savefile.com/files/520223
Retrieve dup values from_array.xls

Take a look at the sample first, then let me know here how it goes ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
On Feb 26, 12:44 pm, Mary wrote:
I tried the formula but it doesn't seem to work. I still get the same row of
data over and over again. What comes out is:

A B C D E
1 4 123 xxxx x1x1 12345
2 5 123 xxxx x1x1 12345

I would really like sheet 2 to look like this:

A B C D
1 101 yyyy y1y1 23456
2 123 xxxx x1x1 12345
3 123 zzzz z1z1 34567
4 215 aaaa a1a1 89100
5 and so on...

Could you please explain further the formulas?





  #6   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default retrieve duplicate values from arrays

Ok, don't think it was a case of confusion. Let's stash away the
earlier suggestion and sample which was directed to your original
posting (& your subject line)

What you're asking for now (your 2nd Q) is to
auto-sort Sheet1's source table by the numbers in the key col A

Here's one way to accomplish this

Assume source data in Sheet1's cols A to D,
from row1 down, with key col A (as before)

In Sheet2,

Put in A1:
=IF(Sheet1!A1="","",Sheet1!A1+ROW()/10^10)

Put in B1:
=IF(ROW()COUNT($A:$A),"",INDEX(Sheet1!A:A,MATCH(S MALL($A:$A,ROW()),$A:
$A,0)))
Copy B1 across to E1. Select A1:E1, copy down to cover the max
expected
extent of data in Sheet1's key col A. Hide away col A. Cols B to E
will
return the required results, all neatly bunched at the top.

Let me know whether the above answers your 2nd Q
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
On Feb 27, 2:09 pm, Mary wrote:
Sorry for the confusion. What I am aiming for is to organise the data in such
a way that they are sorted according to a key criteria (according to number
ie 101, 123, 215 and so on) and if it is duplicated then it will list all the
data with the same key criteria.


  #7   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default retrieve duplicate values from arrays

Here's a working sample to illustrate the suggestion to your 2nd Q:
http://www.savefile.com/files/520753
Auto sort an array.xls
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
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
Finding Duplicate Arrays in a table JohnHB Excel Discussion (Misc queries) 4 July 2nd 09 07:47 PM
Retrieve values from 2 worksheets. [email protected] Excel Worksheet Functions 3 May 24th 06 08:16 PM
Using CORREL with arrays containing null values rmellison Excel Discussion (Misc queries) 1 November 11th 05 03:02 PM
Problem with plotting a chart when using arrays as Values and Xvalues [email protected] Charts and Charting in Excel 3 August 19th 05 09:05 PM
Two arrays need highlight duplicate in one of the array Luke Excel Worksheet Functions 4 July 25th 05 08:41 PM


All times are GMT +1. The time now is 01:48 AM.

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

About Us

"It's about Microsoft Excel"