Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ginger
 
Posts: n/a
Default Need to find a row in a worksheet based on the value of a cell


Hi -
My Excel sheet has two columns that represent minimum and maximum
income limits - looks a little like this:
Column A Column B
1 3
4 6
7 10
11 13

and so on up to 3800 or so. I want users to be able to enter a number,
and be taken to the row that corresponds; for example, if a user enters
12, I want them to be taken to the row where column A = 11 and column
B=13.
I've managed to come up with the VLOOKUP statement to find the closest
matching number in column A (VLOOKUP("data entry cell",A3:B1162, 1,
TRUE)), but I can't figure out how to use the result of the VLOOKUP in
a Find function to take the user to the appropriate row.
Any help would be appreciated.
Ginger


--
Ginger
------------------------------------------------------------------------
Ginger's Profile: http://www.excelforum.com/member.php...o&userid=27034
View this thread: http://www.excelforum.com/showthread...hreadid=442769

  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Worksheet functions can't change selections. You'll need an event macro
to do that.

One way:

Put this in the worksheet code module (right-click the worksheet tab and
choose View Code):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim nMax As Long
nMax = Cells(Rows.Count, 2).End(xlUp).Value
With Target
If .Address(False, False) = "D1" Then _
If IsNumeric(.Value) Then _
If .Value = 1 And .Value <= nMax Then _
Cells(Application.Match(.Value, Range("A:A"), _
True), 1).EntireRow.Select
End With
End Sub

This assumes that cell D1 is the user entry cell - modify to suit.


In article ,
Ginger wrote:

Hi -
My Excel sheet has two columns that represent minimum and maximum
income limits - looks a little like this:
Column A Column B
1 3
4 6
7 10
11 13

and so on up to 3800 or so. I want users to be able to enter a number,
and be taken to the row that corresponds; for example, if a user enters
12, I want them to be taken to the row where column A = 11 and column
B=13.
I've managed to come up with the VLOOKUP statement to find the closest
matching number in column A (VLOOKUP("data entry cell",A3:B1162, 1,
TRUE)), but I can't figure out how to use the result of the VLOOKUP in
a Find function to take the user to the appropriate row.
Any help would be appreciated.
Ginger

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
Referencing data in different worksheet based on month name cosmo_canuck Excel Worksheet Functions 3 August 22nd 05 07:27 AM
How to create a fill down that increments based on the worksheet n Skot Excel Worksheet Functions 7 August 2nd 05 04:47 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
How Do I Find A Specific Worksheet Chris N Excel Discussion (Misc queries) 1 December 27th 04 06:53 PM
Need find cell b3 value on another worksheet! StarGazer Excel Worksheet Functions 3 October 31st 04 03:19 PM


All times are GMT +1. The time now is 02:56 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"