Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range Selection - From Lowest 2 Highest Values?
I usually have a long list of accounts imported with account numbers in 12
digits' numbers. The same is however already sorted. How to select the range of codes, from lowest to the highest codes? For example: 1. In the currently active column; 2. Select FROM the minimum value above 000000000000; 3. UPTO the maximum value below 1000000000000; -- Best Regards, Faraz |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range Selection - From Lowest 2 Highest Values?
Try the below with data in Col A
Dim rngTemp As Range, lngMinRow As Long, lngMaxrow As Long Set rngTemp = Columns("A") lngMinRow = rngTemp.Find(WorksheetFunction.Min(rngTemp)).Row lngMaxrow = rngTemp.Find(WorksheetFunction.Max(rngTemp)).Row Range("A" & lngMinRow & ":A" & lngMaxrow).Select If this post helps click Yes --------------- Jacob Skaria "Faraz A. Qureshi" wrote: I usually have a long list of accounts imported with account numbers in 12 digits' numbers. The same is however already sorted. How to select the range of codes, from lowest to the highest codes? For example: 1. In the currently active column; 2. Select FROM the minimum value above 000000000000; 3. UPTO the maximum value below 1000000000000; -- Best Regards, Faraz |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range Selection - From Lowest 2 Highest Values?
Just as usual buddy!
U R simply the best! -- Best Regards, Faraz "Jacob Skaria" wrote: Try the below with data in Col A Dim rngTemp As Range, lngMinRow As Long, lngMaxrow As Long Set rngTemp = Columns("A") lngMinRow = rngTemp.Find(WorksheetFunction.Min(rngTemp)).Row lngMaxrow = rngTemp.Find(WorksheetFunction.Max(rngTemp)).Row Range("A" & lngMinRow & ":A" & lngMaxrow).Select If this post helps click Yes --------------- Jacob Skaria "Faraz A. Qureshi" wrote: I usually have a long list of accounts imported with account numbers in 12 digits' numbers. The same is however already sorted. How to select the range of codes, from lowest to the highest codes? For example: 1. In the currently active column; 2. Select FROM the minimum value above 000000000000; 3. UPTO the maximum value below 1000000000000; -- Best Regards, Faraz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Question about returning some values from highest to lowest | Excel Discussion (Misc queries) | |||
Averaging without the highest or lowest values | Excel Discussion (Misc queries) | |||
Scores of a Range Cells. Highest or lowest depending a parameter | Excel Worksheet Functions | |||
Average of values in row excluding the highest and lowest value? | Excel Worksheet Functions | |||
Formula to higlight highest and lowest values in row | Excel Worksheet Functions |