Go To Sheet and find range

RLJ

Active Member
Joined
Mar 15, 2011
Messages
417
Office Version
  1. 365
Platform
  1. Windows
I need code that will take the

  1. Active sheet name user is currently on
  2. Go To Sheet "Event Matrix"
  3. On Sheet "Event Matrix" scroll through column "B" to find the cell with the user's active sheet name and make that the active cell.
Example: I'm on Sheet "Default" and I need to go to Sheet "Event Matrix" and scroll the sheet to where the cell value in Column "B" equals "Default" which was the sheet that I came from.

Thank you for your help. I'm working on a pretty big project for a process at work.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Try:
VBA Code:
Sub FindCell()
    Application.ScreenUpdating = False
    Dim srcWS As Worksheet
    Set srcWS = ActiveSheet
    With Sheets("Event Matrix")
        .Activate
        .Range("B" & .Range("B:B").Find(srcWS.Name).Row).Select
    End With
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
Solution
Thank you. It worked perfectly when removing the screen updating. With it set to false, it would not scroll the sheet to the cell.
 
Upvote 0
Maybe just
VBA Code:
Sub Findit()
   Application.Goto Sheets("Event Matrix").Range("B:B").Find(ActiveSheet.Name), True
End Sub
 
Last edited:
Upvote 0
Thank you for the code. Now I would like to append the code so that a user can have the sheet scroll to and select the range. I have tried appending the code to the below and the Evnt value is sowing in the code as I step through it but I keep getting an error.

VBA Code:
Sub FindEvent()
    Dim Evnt As String
    Evnt = Range("C2").Value
    With ActiveSheet
        .Range("B" & .Range("B:B").Find(Evnt).row).Select
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top