Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a cell from an index
Hello,
I'm looking to set a cell as the 'activecell' from an index of cells. What I need is when activating a command button it sets as the activ cell in a range of cells the one with the highest value. For example: A1 = 1, A2 = 3, A3 = 10, A4 = 6 utilizing the command button sets A3 as th activecell any help would be appreciate -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a cell from an index
Hi
try something like the following: Sub select_high() Dim row_index As Long Dim rng As Range Set rng = ActiveSheet.Range("A1:A10") With Application.WorksheetFunction row_index = .Match(.Max(rng), rng, 0) End With ActiveSheet.Cells(row_index, "A").Select End Sub -- Regards Frank Kabel Frankfurt, Germany Hello, I'm looking to set a cell as the 'activecell' from an index of cells. What I need is when activating a command button it sets as the active cell in a range of cells the one with the highest value. For example: A1 = 1, A2 = 3, A3 = 10, A4 = 6 utilizing the command button sets A3 as the activecell any help would be appreciated --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 single cell selecting muliple cell | Excel Worksheet Functions | |||
Selecting a cell entry based on cell validation selection | Excel Worksheet Functions | |||
Transfer cell values to another cell by selecting button. | Excel Worksheet Functions | |||
Index and named ranges selecting difficulty | Excel Worksheet Functions | |||
Selecting chartobject without index no. | Charts and Charting in Excel |