Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i find specific data in a cell and its colocated cell data | Excel Worksheet Functions | |||
Grabbing data from a specific cell | Excel Worksheet Functions | |||
Lock data in a cell a specific cell based on selection on other ce | Excel Worksheet Functions | |||
Extracting specific data from a cell | Excel Worksheet Functions | |||
Select specific Data from a cell | Excel Programming |