Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default going to a cell that contain specific data

Hi,

What i'm trying to do is setup a userform that lets the user select a name
then click on a button an goto that name on a sheet.

So far i have set up the userform and can select the name from a combo box
and have created a variable that holds what ever is selected in the combo
box

i.e. corp = ComboBox1.text

but i cant figure out how to take the user to the cell that contains the
same text.

i.e. if the user selects the name Bob i want to be able to take the user the
cell that contains Bob.

This wouldnt be problem if the cell that contains Bob was fixed, however it
is not fixed and moves.

Any ideas?

many thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default going to a cell that contain specific data

How this is implemented depends on what you do with your userform after the button is clicked....

Dim myR As Range

Set myR = Worksheets("Sheetname").Cells.Find(corp)

If Not myR Is Nothing Then
myR.Select
End If

HTH,
Bernie
MS Excel MVP


"Tom" wrote in message
...
Hi,

What i'm trying to do is setup a userform that lets the user select a name
then click on a button an goto that name on a sheet.

So far i have set up the userform and can select the name from a combo box
and have created a variable that holds what ever is selected in the combo
box

i.e. corp = ComboBox1.text

but i cant figure out how to take the user to the cell that contains the
same text.

i.e. if the user selects the name Bob i want to be able to take the user the
cell that contains Bob.

This wouldnt be problem if the cell that contains Bob was fixed, however it
is not fixed and moves.

Any ideas?

many thanks,



  #3   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default going to a cell that contain specific data

Sorry for my late reply.

That worked a treat, i only needed to get it activate the sheet first.
Below is what i ended up with.

Dim myR As Range

Set myR = Worksheets("sheetname").Cells.Find(corp)

If Not myR Is Nothing Then
Sheet2.Activate
myR.Select
End If

Many thanks,
Tom

"Bernie Deitrick" wrote:

How this is implemented depends on what you do with your userform after the button is clicked....

Dim myR As Range

Set myR = Worksheets("Sheetname").Cells.Find(corp)

If Not myR Is Nothing Then
myR.Select
End If

HTH,
Bernie
MS Excel MVP


"Tom" wrote in message
...
Hi,

What i'm trying to do is setup a userform that lets the user select a name
then click on a button an goto that name on a sheet.

So far i have set up the userform and can select the name from a combo box
and have created a variable that holds what ever is selected in the combo
box

i.e. corp = ComboBox1.text

but i cant figure out how to take the user to the cell that contains the
same text.

i.e. if the user selects the name Bob i want to be able to take the user the
cell that contains Bob.

This wouldnt be problem if the cell that contains Bob was fixed, however it
is not fixed and moves.

Any ideas?

many thanks,




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default going to a cell that contain specific data

Tom,

That's precisely what I meant by "How this is implemented depends on what you do with your userform
after the button is clicked...."

Bernie
MS Excel MVP

That worked a treat, i only needed to get it activate the sheet first.



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
how do i find specific data in a cell and its colocated cell data sfself Excel Worksheet Functions 4 March 27th 09 08:23 AM
Grabbing data from a specific cell *Kenneth* Excel Worksheet Functions 2 March 18th 08 10:31 PM
Lock data in a cell a specific cell based on selection on other ce CrimsonPlague29 Excel Worksheet Functions 0 May 10th 06 11:06 AM
Extracting specific data from a cell Neil Bowen Excel Worksheet Functions 5 October 30th 05 04:33 PM
Select specific Data from a cell [email protected] Excel Programming 11 March 30th 05 08:28 PM


All times are GMT +1. The time now is 08:42 PM.

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"