Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Sort by Large, Offset from Match, Duplicate values problem

Heya all,

I have a large list of dynamic data, which I am organizing in different
ways. I realize this can all be done in PivotTables, but we have to do this
the olde fashioned way. The table I am drawing the info from looks roughly
like this:

Worksheet: DATA

Player Buy-In Cash-Out Difference # Times entered
Joe SHMOE $930 $900 $30 1
Sam DOG $0 $0 $0 0
Peter BLAH $100 $1000 $900 22
Doug FINN $500 $0 $500 22

I am using =LARGE, =SMALL on the columns to sort the data, and then MATCH to
find that value, and OFFSET to get the other values in that line. I am using
this method because VLOOKUP can only search to the left of the reference, and
the majority of things I am looking up are in Column B, C D & E.

An example formula is sorting by number of entries on another sheet:
=LARGE(DATA!$E$2:$E$5,1) =LARGE(DATA!$E$2:$E$5,2) =LARGE(DATA!$E$2:$E$5,3)
=LARGE(DATA!$E$2:$E$5,4), etc.
This organizes the data into Most Frequent, in this case.
Then I use: =OFFSET(DATA!$E$2,MATCH($F3,DATA!$E:$E,0)-2,-2)
=OFFSET(DATA!$E$2,MATCH($F3,DATA!$E:$E,0)-2,-3)
=OFFSET(DATA!$E$2,MATCH($F3,DATA!$E:$E,0)-2,-4) to build the rest of the info
on that line. F3 would be the cell where the value of the LARGE is located.

Everything works fine and dandy until you come to matching values (22
visits). Now it returns both 22s, but Match will only return the "first" 22
value. So the table results would look like this:
Player Buy-In Cash-Out Difference # Times entered
Peter BLAH $100 $1000 $900 22
Peter BLAH $100 $1000 $900 22
Joe SHMOE $930 $900 $30 1
Sam DOG $0 $0 $0 0

Is there a way to modify my formula, perhaps with an IF statement to detect
duplicate values, to prevent the same value from being read over & over?

Thanks for any help you can offer!

~Jay
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default Sort by Large, Offset from Match, Duplicate values problem

On the data sheet use this formula to create a nominal Rank of column E, so
in F2
enter
=IF(ISERROR(SMALL(Data!$F$2:F$5,ROW()-1)),"",SMALL(Data!$F$2:F$5,ROW()-1))

copy this down past your data as for as you like. This is the column that
we'll use to get the data in sheet 2. The formula is entered in Sheet2 F1

=IF(ISERROR(SMALL(Data!$F$2:F$5,ROW()-1)),"",SMALL(Data!$F$2:F$5,ROW()-1))

copy down as far as you wish.
In E2 enter this formula:

=IF($F$2="","",INDEX(Data!E:E,MATCH($F2,Data!$F:$F ,0)))

Copy this formula across to a2 so this formula is now in A2 to E2.

Select A2:E2 and copy down as far as you wish.

Please click Yes if useful.

Peter
"JWC Excel" wrote:

Heya all,

I have a large list of dynamic data, which I am organizing in different
ways. I realize this can all be done in PivotTables, but we have to do this
the olde fashioned way. The table I am drawing the info from looks roughly
like this:

Worksheet: DATA

Player Buy-In Cash-Out Difference # Times entered
Joe SHMOE $930 $900 $30 1
Sam DOG $0 $0 $0 0
Peter BLAH $100 $1000 $900 22
Doug FINN $500 $0 $500 22

I am using =LARGE, =SMALL on the columns to sort the data, and then MATCH to
find that value, and OFFSET to get the other values in that line. I am using
this method because VLOOKUP can only search to the left of the reference, and
the majority of things I am looking up are in Column B, C D & E.

An example formula is sorting by number of entries on another sheet:
=LARGE(DATA!$E$2:$E$5,1) =LARGE(DATA!$E$2:$E$5,2) =LARGE(DATA!$E$2:$E$5,3)
=LARGE(DATA!$E$2:$E$5,4), etc.
This organizes the data into Most Frequent, in this case.
Then I use: =OFFSET(DATA!$E$2,MATCH($F3,DATA!$E:$E,0)-2,-2)
=OFFSET(DATA!$E$2,MATCH($F3,DATA!$E:$E,0)-2,-3)
=OFFSET(DATA!$E$2,MATCH($F3,DATA!$E:$E,0)-2,-4) to build the rest of the info
on that line. F3 would be the cell where the value of the LARGE is located.

Everything works fine and dandy until you come to matching values (22
visits). Now it returns both 22s, but Match will only return the "first" 22
value. So the table results would look like this:
Player Buy-In Cash-Out Difference # Times entered
Peter BLAH $100 $1000 $900 22
Peter BLAH $100 $1000 $900 22
Joe SHMOE $930 $900 $30 1
Sam DOG $0 $0 $0 0

Is there a way to modify my formula, perhaps with an IF statement to detect
duplicate values, to prevent the same value from being read over & over?

Thanks for any help you can offer!

~Jay

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default Sort by Large, Offset from Match, Duplicate values problem

I must have missed the dynamic range in the formulas. The nominal rank can be
written in F2 of sheet Data! as:


=IF(A2="","",RANK($E2,$E:$E)+COUNTIF($E$2:$E2,$E2)-1)

F2 of the SortByFormulas sheet is:
=IF(ISERROR(SMALL(Data!$F:$F,ROW()-1)),"",SMALL(Data!F:F,ROW()-1))

E2 in same sheet is:
=IF($F2="","",INDEX(Data!E:E,MATCH($F2,Data!$F:$F, 0)))

Copy this across to A2 then copy the rows of formulas down.

HTH
Peter

"Billy Liddel" wrote:

On the data sheet use this formula to create a nominal Rank of column E, so
in F2
enter
=IF(ISERROR(SMALL(Data!$F$2:F$5,ROW()-1)),"",SMALL(Data!$F$2:F$5,ROW()-1))

copy this down past your data as for as you like. This is the column that
we'll use to get the data in sheet 2. The formula is entered in Sheet2 F1

=IF(ISERROR(SMALL(Data!$F$2:F$5,ROW()-1)),"",SMALL(Data!$F$2:F$5,ROW()-1))

copy down as far as you wish.
In E2 enter this formula:

=IF($F$2="","",INDEX(Data!E:E,MATCH($F2,Data!$F:$F ,0)))

Copy this formula across to a2 so this formula is now in A2 to E2.

Select A2:E2 and copy down as far as you wish.

Please click Yes if useful.

Peter
"JWC Excel" wrote:

Heya all,

I have a large list of dynamic data, which I am organizing in different
ways. I realize this can all be done in PivotTables, but we have to do this
the olde fashioned way. The table I am drawing the info from looks roughly
like this:

Worksheet: DATA

Player Buy-In Cash-Out Difference # Times entered
Joe SHMOE $930 $900 $30 1
Sam DOG $0 $0 $0 0
Peter BLAH $100 $1000 $900 22
Doug FINN $500 $0 $500 22

I am using =LARGE, =SMALL on the columns to sort the data, and then MATCH to
find that value, and OFFSET to get the other values in that line. I am using
this method because VLOOKUP can only search to the left of the reference, and
the majority of things I am looking up are in Column B, C D & E.

An example formula is sorting by number of entries on another sheet:
=LARGE(DATA!$E$2:$E$5,1) =LARGE(DATA!$E$2:$E$5,2) =LARGE(DATA!$E$2:$E$5,3)
=LARGE(DATA!$E$2:$E$5,4), etc.
This organizes the data into Most Frequent, in this case.
Then I use: =OFFSET(DATA!$E$2,MATCH($F3,DATA!$E:$E,0)-2,-2)
=OFFSET(DATA!$E$2,MATCH($F3,DATA!$E:$E,0)-2,-3)
=OFFSET(DATA!$E$2,MATCH($F3,DATA!$E:$E,0)-2,-4) to build the rest of the info
on that line. F3 would be the cell where the value of the LARGE is located.

Everything works fine and dandy until you come to matching values (22
visits). Now it returns both 22s, but Match will only return the "first" 22
value. So the table results would look like this:
Player Buy-In Cash-Out Difference # Times entered
Peter BLAH $100 $1000 $900 22
Peter BLAH $100 $1000 $900 22
Joe SHMOE $930 $900 $30 1
Sam DOG $0 $0 $0 0

Is there a way to modify my formula, perhaps with an IF statement to detect
duplicate values, to prevent the same value from being read over & over?

Thanks for any help you can offer!

~Jay

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
Eliminating Duplicate values on a large workbook Wacky Wednesday Excel Worksheet Functions 1 June 24th 09 05:51 PM
MATCH() and duplicate values -- is there a workaround? JimmyQ Excel Worksheet Functions 1 August 10th 06 10:33 AM
Is there a way MATCH() can cope with duplicate values? JimmyQ Excel Worksheet Functions 3 August 9th 06 11:25 PM
Sort a large file then sum like values... jgray Excel Discussion (Misc queries) 2 August 1st 05 09:22 PM
VLOOKUP, OFFSET, MATCH PROBLEM, HELP? Steve Excel Worksheet Functions 0 January 30th 05 09:11 PM


All times are GMT +1. The time now is 04:54 PM.

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"