Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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
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
Excel 2007 single cell selecting muliple cell Submit2s Excel Worksheet Functions 1 February 12th 09 04:52 PM
Selecting a cell entry based on cell validation selection Brutalius Excel Worksheet Functions 2 December 17th 08 03:44 AM
Transfer cell values to another cell by selecting button. Gryndar Excel Worksheet Functions 2 November 24th 08 02:21 AM
Index and named ranges selecting difficulty Bruce Tharp Excel Worksheet Functions 7 June 19th 07 02:49 AM
Selecting chartobject without index no. Jaylin Charts and Charting in Excel 4 August 24th 06 04:31 PM


All times are GMT +1. The time now is 12:29 AM.

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"