Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 361
Default Create Table From Another Table

My Data table looks like this:

Product Rep Price1 Price2 Diff
A Jim 30 42 12
A Bob 35 42 7
A Stan 40 42 2
A Bill 45 42 3
A Ed 50 42 8
B Jim 15 28 13
B Bob 20 28 8
B Stan 25 28 3
B Bill 30 28 2
B Ed 35 28 7
C Jim 1 7.5 6.5
C Bob 2 7.5 5.5
C Stan 3 7.5 4.5
C Bill 4 7.5 3.5
C Ed 5 7.5 2.5


I am trying to create this table:

Product Rep
A Stan
B Bill
C Ed

This new table lists each Product, and identifies the Rep that has the
smallest "Diff". If there is a tie, it is not that important which rep is
listed but I only need one listed. The actual data table has on average
40,000 rows - if that makes a difference on the approach for a solution.

Is it possible to do this with VBA and/or excel formulas ?

Thank you in advance.



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Create Table From Another Table

Try something like this:

With
A1:E16 contains your posted data list

Then
I1: Prod
I2: A
I3: B
I4: C

J1: Rep

Put this ARRAY FORMULA* in
J2:
=INDEX($B$1:$B$16,SUM(($A$2:$A$16=I2)*($E$2:$E$16= MIN(IF($A$2:$A$16=I2,$E$2:$E$16)))*ROW($E$2:$E$16) ))

*Note: For array formulas, hold down [Ctrl] and [Shift] when you press
[Enter], instead of just pressing [Enter].

Copy J2 and paste into J3:J4

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"carl" wrote:

My Data table looks like this:

Product Rep Price1 Price2 Diff
A Jim 30 42 12
A Bob 35 42 7
A Stan 40 42 2
A Bill 45 42 3
A Ed 50 42 8
B Jim 15 28 13
B Bob 20 28 8
B Stan 25 28 3
B Bill 30 28 2
B Ed 35 28 7
C Jim 1 7.5 6.5
C Bob 2 7.5 5.5
C Stan 3 7.5 4.5
C Bill 4 7.5 3.5
C Ed 5 7.5 2.5


I am trying to create this table:

Product Rep
A Stan
B Bill
C Ed

This new table lists each Product, and identifies the Rep that has the
smallest "Diff". If there is a tie, it is not that important which rep is
listed but I only need one listed. The actual data table has on average
40,000 rows - if that makes a difference on the approach for a solution.

Is it possible to do this with VBA and/or excel formulas ?

Thank you in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default Create Table From Another Table

UI method: Choose Data Sort by Diff Ascending then select the product
column and choose Data Filter Advanced Filter Unique Records Only.

You could then copy this to a new sheet - work on a copy of the data if
you are afraid of changing the order.


carl wrote:

My Data table looks like this:

Product Rep Price1 Price2 Diff
A Jim 30 42 12
A Bob 35 42 7
A Stan 40 42 2
A Bill 45 42 3
A Ed 50 42 8
B Jim 15 28 13
B Bob 20 28 8
B Stan 25 28 3
B Bill 30 28 2
B Ed 35 28 7
C Jim 1 7.5 6.5
C Bob 2 7.5 5.5
C Stan 3 7.5 4.5
C Bill 4 7.5 3.5
C Ed 5 7.5 2.5


I am trying to create this table:

Product Rep
A Stan
B Bill
C Ed

This new table lists each Product, and identifies the Rep that has the
smallest "Diff". If there is a tie, it is not that important which rep is
listed but I only need one listed. The actual data table has on average
40,000 rows - if that makes a difference on the approach for a solution.

Is it possible to do this with VBA and/or excel formulas ?

Thank you in advance.


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
Using dynamic range to create pivot table cursednomore Excel Discussion (Misc queries) 5 March 12th 07 02:40 PM
Display the source for a pivot table page field Gary Brown Excel Worksheet Functions 4 November 8th 06 03:02 PM
Create a toplist from data in table [email protected] Excel Discussion (Misc queries) 0 October 14th 06 01:50 AM
How do I create a combination chart and table with different data. betsystone Charts and Charting in Excel 1 October 2nd 06 03:37 PM
Please respond: Need to create additional measure in pivot table Angel Excel Discussion (Misc queries) 1 June 19th 06 08:19 PM


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