Hi Tanya
I am assuming that you have created a Data Validation list in B2, to enable
selection of any name from column A of sheet startup.
Column B only requires the sheet name associated with the name in column A,
do not enter the cell reference C2.
If so, then the following event code should be copied to sheet Startup.
Copy code
Right click on startup tab>View Code>Paste
Alt+F11 to return to Excel
Private Sub Worksheet_Change(ByVal Target As Range)
Dim wsname As String, name As String
If Target.Count > 1 Then Exit Sub
If Target.Column = 2 And Target.Row = 2 Then
name = Range("B2").Value
Range("A:A").Activate
Cells.Find(What:=name, _
After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
wsname = ActiveCell.Offset(0, 1).Value
Range("B2").Activate ' put focus back to selection cell
Sheets(wsname).Select
Sheets(wsname).Range("C2").Activate
End If
End Sub
When you make any selection from the dropdown in cell B2, the code will
trigger and take you to the sheet name associated with that name from column
2
I would place a hyperlink on each sheet in say cell A1, which takes the user
back to Startup sheet.
--
Regards
Roger Govier
Tanya said:
I've written the following macro but it won't activate the scheet after
finding the value.
Private Sub CommandButton1_Click()
Range("B5").Select
Sheets("Startup").Select
Cells.Find(What:=B2, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
End Sub
Any assistance greatly appreciated.
Kind Regards
Tanya
excelent said:
http://pmexcelent.dk/Tanya.xls
"Tanya" skrev:
Hi, I would like on the selection from a validation list to go to a
particular cell on another sheet [the same cell reference of each sheet
for
each value in the list] is this possible.
Example
validation list would contain a list of student names -
Smith, Henry
Duck, Donald
Rabbit, Roger
Result-
Smith, Henry [hyperlink to C2 on sheet S1]
Duck, Rabbit [hyperlink to C2 on sheet S2]
Note: S1 and S2 are sheet names referring in brief to student 1, 2 and
so on.
I hope this makes sense. I don't expect hyperlink will be the way to
solve
this, perhaps a macro? or a vlookup?
Thanking you in advance.
Tanya