Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Select two items from many

There are about 100 records in a table. Column A has names in it, many
different names and each name occurring from 1 to any number of times.
I want to select a group of records consisting of the first two
occurances of each name. In the case where a name occurs only once,
one record. The records can be sorted by name.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Select two items from many

Hi
No need for VB
1. Sort your records by name
2. Create a new column called Count
3. In the Count column, first row, put in 1. I will assume that your
names are in column A, headings are in row1 with the Count column in
column B. So the 1 is in B2.
4. Put this formula in B3
=IF(A3=A2,B2+1,1)

5. Copy the formula down.
6. Select the records (including the Counts) with headings and put on
Autofilter. Click on the Count dropdown then Custom.... In the first
box choose the condition "is less than or equal to" and in the box
next to it type 2.

You can now copy and paste the filtered list as required.
regards
Paul

On Jun 15, 11:35*pm, Slim Slender wrote:
There are about 100 records in a table. Column A has names in it, many
different names and each name occurring from 1 to any number of times.
I want to select a group of records consisting of the first two
occurances of each name. In the case where a name occurs only once,
one record. The records can be sorted by name.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Select two items from many

On Jun 16, 4:38*am, Paul Robinson
wrote:
Hi
No need for VB
1. Sort your records by name
2. Create a new column called Count
3. In the Count column, first row, put in 1. I will assume that your
names are in column A, headings are in row1 with the Count column in
column B. So the 1 is in B2.
4. Put this formula in B3
* *=IF(A3=A2,B2+1,1)

5. Copy the formula down.
6. Select the records (including the Counts) with headings and put on
Autofilter. Click on the Count dropdown then Custom.... In the first
box choose the condition "is less than or equal to" and in the box
next to it type 2.

You can now copy and paste the filtered list as required.
regards
Paul

On Jun 15, 11:35*pm, Slim Slender wrote:



There are about 100 records in a table. Column A has names in it, many
different names and each name occurring from 1 to any number of times.
I want to select a group of records consisting of the first two
occurances of each name. In the case where a name occurs only once,
one record. The records can be sorted by name.- Hide quoted text -


- Show quoted text -


Thanks Paul, I'll try this.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Select two items from many

On Jun 16, 7:05*am, Slim Slender wrote:
On Jun 16, 4:38*am, Paul Robinson
wrote:





Hi
No need for VB
1. Sort your records by name
2. Create a new column called Count
3. In the Count column, first row, put in 1. I will assume that your
names are in column A, headings are in row1 with the Count column in
column B. So the 1 is in B2.
4. Put this formula in B3
* *=IF(A3=A2,B2+1,1)


5. Copy the formula down.
6. Select the records (including the Counts) with headings and put on
Autofilter. Click on the Count dropdown then Custom.... In the first
box choose the condition "is less than or equal to" and in the box
next to it type 2.


You can now copy and paste the filtered list as required.
regards
Paul


On Jun 15, 11:35*pm, Slim Slender wrote:


There are about 100 records in a table. Column A has names in it, many
different names and each name occurring from 1 to any number of times..
I want to select a group of records consisting of the first two
occurances of each name. In the case where a name occurs only once,
one record. The records can be sorted by name.- Hide quoted text -


- Show quoted text -


Thanks Paul, I'll try this.- Hide quoted text -

- Show quoted text -


Works for me!
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 Pre-Select items in Multi-Select List on Form MikeZz Excel Programming 2 August 6th 09 06:33 PM
Cannot select items in listbox [email protected] Excel Programming 0 March 25th 08 03:49 PM
Cannot Select Items in ListBoxes [email protected] Excel Programming 0 March 21st 08 04:50 AM
how do I select one from multiple items Jono Excel Discussion (Misc queries) 0 March 15th 06 02:08 PM
Listboxes and select items in it droopy928gt[_4_] Excel Programming 6 March 3rd 06 12:32 PM


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