Select Selected Cell in Different Sheet

misiek5510

New Member
Joined
May 25, 2021
Messages
38
Office Version
  1. 2016
Platform
  1. Windows
  2. Mobile
I'm trying to do a simple thing as above however can't seem to find an answer.
Basically If I select C5 for example and run the macro I'd like it to go to a different sheet/tab and select the exact same cell.

Below works but only if I specify the cell the cell prior, and I'd like it to be dynamic.

Range("C5").Select
Sheets("Comments").Select
Range("C5").Select
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi. Could you give us more? You rarely need to select a cell in VBA.
 
Upvote 0
Hi & welcome to MrExcel.
How about
VBA Code:
   Application.Goto Sheets("Comments").Range(ActiveCell.Address)
 
Upvote 0
Solution
You rarely need to select a cell in VBA mind... reason you dont is its slow.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,018
Messages
6,122,703
Members
449,093
Latest member
Mnur

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