Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That worked perfectly.
Thanks for your help. -- Rex Munn "PY & Associates" wrote: On Apr 29, 11:56 am, Javed wrote: On Apr 29, 12:34 am, Rex wrote: I have a spreadsheet with 26 columns of info thats approx. 1000 rows long. I need to sort by column L and then Column I. When done sorting I will have multiple names (different every report) in column L and multiple medical conditions (different every time) in column I. The goal is to keep one row of each name matched with one entry of each medical condition (sorted for that name) and hide all the other rows. Daffy Duck may have 15 entries with a broken elbow and 13 entries with the flu. I only want one row of each condition associated with Daffy Duck to appear (it doesn't matter which row) and the rest of the rows would be hidden. This would continue thru all the names and conditions. Anyone have any macro suggestions? I use Excel 2003. -- Rex Munn Best is to use pivottable.which will sort and return the unique. something like this Option Explicit Sub m() Dim c As Range Dim rng As Range Set rng = Range("I1:I1000") For Each c In rng If c = c.Offset(1) And c.Offset(, 4) = c.Offset(1, 4) Then c.RowHeight = 0 Next c End Sub . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting data | New Users to Excel | |||
Sorting data within the same row. | Excel Worksheet Functions | |||
Sorting data to match existing data | Excel Discussion (Misc queries) | |||
colors of bar charted data don't follow data after sorting | Charts and Charting in Excel | |||
SORTING DATA | Excel Worksheet Functions |