Activate the Selected Cell....

simonjervis

New Member
Joined
Jun 4, 2009
Messages
18
In column D I have a formula which will result in only one cell returning an error. I have the following code which is selecting that cell;

Range("D19:D6588").Select
Selection.SpecialCells(xlCellTypeFormulas, 16).Select

I would now like the code to scroll to that cell, but am having trouble achieving this. I tried addind the following;

Application.Goto Selection = ActiveCell, Scroll:=True

But of course this doesn't work becuase the cell I want to scroll to is SELECTED not ACTIVATED.

Can anyone help?
 
Last edited:

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
The GoTo method doesn't have a Selection argument. This worked for me:

Code:
Sub Test()
    Range("D19:D6588").Select
    Selection.SpecialCells(xlCellTypeFormulas, 16).Select
    Application.Goto Reference:=ActiveCell, Scroll:=True
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,208
Members
448,554
Latest member
Gleisner2

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