Go to a cell of a different worksheet within the same workbook

I

igbert

I have Sheet 1 to Sheet 10 within a workbook.

If Sheet 1 Cell A10 is non blank, I want Excel to go to Sheet 2 Cell E8.

Does anyone have any idea?
 
D

Don Guillett

Why don't you give us more info as to your total need so a proper solution
may be offered.
 
I

igbert

Hi Don,


Sheet 1 Cell A10 is orinigally a blank cell. if there is any data entered
onto this cell, I want Excel automatically exit from Sheet 1 and display
Sheet 2 with the cursor sitting at Cell E8.

Thanks,

Igbert
 
G

Gord Dibben

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("A10")) Is Nothing Then Exit Sub
Application.Goto Sheets("Sheet2").Range("E8")
End Sub

Entered in the module of Sheet1


Gord Dibben MS Excel MVP
 
I

igbert

Hi Gord,

Instead of checking for 1 cell, ss it possible to check 2 cells that are not
in a range i.e A10 and F15 in Sheet 1 before going to Sheet 2.

Thanks.

Igbert
 
D

Don Guillett

One way
if target.address=range("a10").address or _
target.address=range("f15").address then _
Application.Goto Sheets("Sheet2").Range("E8")
 
I

igbert

tHi Don,

Thanks for the answer. Its works well.

What if I want to verify 3 or more non blank cells?

And what if I want to verify A10 is non blank AND F15 is blank in sheet 1
berfore poping up Sheet 2?

Thanks

Igbert
 
I

igbert

I have tried but unable to make it work.

Wonder if anyone could help.

Verify A10 is non blank cell AND F15 is a blank cell in sheet 1 berfore auto
switching to Cell E8 of Sheet 2?


Igbert
 
Top