ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code - different Worksheet (https://www.excelbanter.com/excel-programming/293168-re-code-different-worksheet.html)

Frank Kabel

Code - different Worksheet
 
Hi
you need a event procedure for this. Enter the following in your
worksheet module of the first sheet (assumption cell A1 is the cell you
enter your data)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
On Error GoTo CleanUp:
With Target
if .value <"" then
Application.EnableEvents = false
worksheets(.value).activate
end if
End With
CleanUp:
Application.EnableEvents = True
End Sub


--
Regards
Frank Kabel
Frankfurt, Germany

tennec wrote:
I would love some assistance in writing some code that would look at
the data entered(three choices) in a cell that would then go to one
of three different worksheets. For example, if "A" is entered in a
cell, then this would take you to worksheet "A". Thank you.




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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com