Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to delete rows with repeating values and leaving only one with highest value on the next column?

Hi,

I really need a macro that will delete all the rows with repeating
values leaving only the last row that has the highest value on the
column next to it. Basically my data has 2 columns, the one on the
right has repeating values while the one on the left is increasing in
values. So I need a macro that would delete both rows right up to the
pair where the column on the left has the highest value.



Please help me!

Thanks heaps!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default How to delete rows with repeating values and leaving only one with highest value on the next column?

Hi
lets assume your repeating value is in column A and the oncreasing
value in column B
Enter the following array formula ain C1 (entered with
CTRL+sHIFT+ENTER):
=IF(B1<MAX(IF($A$1:$A$100=A1,$B$1:$B$100)),"X","" )
and copy this down for all rows. Now filter with column C and delete
the filtered rows

--
Regards
Frank Kabel
Frankfurt, Germany


Justin wrote:
Hi,

I really need a macro that will delete all the rows with repeating
values leaving only the last row that has the highest value on the
column next to it. Basically my data has 2 columns, the one on the
right has repeating values while the one on the left is increasing in
values. So I need a macro that would delete both rows right up to the
pair where the column on the left has the highest value.



Please help me!

Thanks heaps!


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
delete all dulplicate rows leaving no record of the duplicates nozzaworld Excel Discussion (Misc queries) 3 February 22nd 10 08:33 PM
delete duplicate values - leaving unique records only i.e. recordspresent once only Jonny Ross Excel Worksheet Functions 4 January 11th 09 02:25 AM
delete a duplicate in column while leaving other duplicates daphoenix Excel Worksheet Functions 1 June 25th 08 04:15 PM
2 rows, highest No in row 1, then highest number in row 2 relating to that column, possible duplicates John Excel Worksheet Functions 3 August 11th 06 04:34 AM
How to delete values in each row leaving only last value ? Oleg Excel Discussion (Misc queries) 1 March 10th 06 07:17 PM


All times are GMT +1. The time now is 05:56 PM.

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

About Us

"It's about Microsoft Excel"