Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 122
Default Go To to find a ID# in a column?

Hello,

I have created a worksheet that has 18000 + rows. There are 550 ID numbers
for my employees.
What I would like to do is create a cell that when I type in a ID# it will
take me to the persons ID# in column "A" where ever it is located. In cell
number 53 or cell number 17200. just to give you a little heads up each
employee has 30 rows of information so there's a gap between ID#'s.
I can use Go To but other people will be using this and they are not a
computer knowledgeable. I need to make this as user friendly as possible.
Basically I need to create a macro or formula that will bring you down to
a ID# in a single column.

"Sample"

Search box |__2__|

A
1
2

3
4

- -
Thank you for all your help!
Glenn
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Go To to find a ID# in a column?

I'm assuming you don't have to worry about duplicate ID numbers, or at least
only want to go to first reference. Right click on your sheet tab, view code,
paste this in. Change the range callouts as appropriate.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
'Change the following callouts as desired
SearchCell = "$A$2"
SearchRange = "A4:A20000"

If Target.Address = SearchCell Then
Range(SearchRange).Select
Selection.Find(What:=Range(SearchCell).Value, After:=ActiveCell,
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate
End If

End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Glenn" wrote:

Hello,

I have created a worksheet that has 18000 + rows. There are 550 ID numbers
for my employees.
What I would like to do is create a cell that when I type in a ID# it will
take me to the persons ID# in column "A" where ever it is located. In cell
number 53 or cell number 17200. just to give you a little heads up each
employee has 30 rows of information so there's a gap between ID#'s.
I can use Go To but other people will be using this and they are not a
computer knowledgeable. I need to make this as user friendly as possible.
Basically I need to create a macro or formula that will bring you down to
a ID# in a single column.

"Sample"

Search box |__2__|

A
1
2

3
4

- -
Thank you for all your help!
Glenn

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 122
Default Go To to find a ID# in a column?

Like,

Thank you for your response.
I am a true laymen. I have not worked with VBA except for recording a macro
through excel. I am trying to make sense of what you posted.
My first question: SearchCell = "$A$2" Is this the box where you place
the ID# you place the ID you are searching?
The search Range that you posted will work for the range of the ID#'s.

Range(SearchRange).Select
Selection.Find(What:=Range(SearchCell).Value, After:=ActiveCell,


Where you have (SearchRange) and (SearchCell) and (ActiveCell) Do I need to
replace these with the Range,Cell and Active Cell?
One more question do I need to change anything else in the macro you sent
me?
--
Thank You
Glenn


"Luke M" wrote:

I'm assuming you don't have to worry about duplicate ID numbers, or at least
only want to go to first reference. Right click on your sheet tab, view code,
paste this in. Change the range callouts as appropriate.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
'Change the following callouts as desired
SearchCell = "$A$2"
SearchRange = "A4:A20000"

If Target.Address = SearchCell Then
Range(SearchRange).Select
Selection.Find(What:=Range(SearchCell).Value, After:=ActiveCell,
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate
End If

End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Glenn" wrote:

Hello,

I have created a worksheet that has 18000 + rows. There are 550 ID numbers
for my employees.
What I would like to do is create a cell that when I type in a ID# it will
take me to the persons ID# in column "A" where ever it is located. In cell
number 53 or cell number 17200. just to give you a little heads up each
employee has 30 rows of information so there's a gap between ID#'s.
I can use Go To but other people will be using this and they are not a
computer knowledgeable. I need to make this as user friendly as possible.
Basically I need to create a macro or formula that will bring you down to
a ID# in a single column.

"Sample"

Search box |__2__|

A
1
2

3
4

- -
Thank you for all your help!
Glenn

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
compare data in column A with column B to find duplicates George Excel Discussion (Misc queries) 8 February 6th 09 03:53 PM
find last row value in column when using MATCH to find column Bouce Excel Worksheet Functions 6 February 6th 08 10:16 PM
Find something in column a then find if column B matches criteria Darrell_Sarrasin via OfficeKB.com Excel Discussion (Misc queries) 8 November 28th 07 09:40 PM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
To find Multiple values in column B for a unique value in column A kishdaba Excel Worksheet Functions 2 November 14th 06 12:49 PM


All times are GMT +1. The time now is 01:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"