Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Select one entry per group

I have a column that contains product codes. Each product code may have
several rows of data but the product code stays constant from row to row
within the group. Is there a way that I can do a vlookup to only pick up the
product code only once from each group? (The product codes can vary from
month to month so I don't want to hard code anything.)

Example:

A008
A008
A008
A008
A010
A010
A010
A012
A013
A013
A Total

I would like to pull A008, A010, A012, A013 & A Total,......

Any help would be appreciated.





--
AJ
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 155
Default Select one entry per group

This is a formula I picked up from here and I am able to make it work just as
you are wanting.
Assuming your Product codes are in cells d3:d12. In adjacent cells ("E3" in
this ex. -you can hide them later) put without the {} brackets:

{=INDEX($D$3:$D$12,MIN(IF((COUNTIF($E$2:E2,$D$3:$D $12)=0)*($D$3:$D$12<""),ROW($D$3:$D$12)))-MIN(ROW($D$3:$D$12))+1)}

Use CTR-SHIFT-ENTER to enter the formula as an array. You will get the
brackets on the ends. Drag this down to the cell across from the last Product
code. You will get the single codes followed by #Value! in the rest of the
cells. In the F column put the formula:

=IF(ISERR(E3),"",E3) and drag it down to g12.

Make your drop down box to link to the range F3:F12.

You can adjust this to fit your size and needs.

Squeaky

"AJ" wrote:

I have a column that contains product codes. Each product code may have
several rows of data but the product code stays constant from row to row
within the group. Is there a way that I can do a vlookup to only pick up the
product code only once from each group? (The product codes can vary from
month to month so I don't want to hard code anything.)

Example:

A008
A008
A008
A008
A010
A010
A010
A012
A013
A013
A Total

I would like to pull A008, A010, A012, A013 & A Total,......

Any help would be appreciated.





--
AJ

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 select group of 77 number ghost Excel Discussion (Misc queries) 1 June 10th 08 11:28 AM
Mandatory entry for a group of cells? JB Excel Discussion (Misc queries) 3 May 16th 07 07:51 PM
Extract select group of numbers JHL Excel Discussion (Misc queries) 3 May 14th 07 09:58 AM
How to select group of drop down lists to align HelenMB New Users to Excel 1 November 30th 06 07:26 PM
Can I select and Group Autoshapes in Excel 97 ? diglas1 via OfficeKB.com New Users to Excel 17 June 13th 06 02:42 AM


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