How to go to a specific cell with a macro
Glen27
-
eriiic Posted messages 24581 Registration date Status Contributor Last intervention -
eriiic Posted messages 24581 Registration date Status Contributor Last intervention -
Hello,
I need to go to a specific cell using a macro.
I know how to do it "live" (Go To), but I can't do it with the macro, which I know the cell coordinates of (which change each time), but I can't specify it in the macro.
Thank you in advance for your help.
Best regards
Configuration: Windows 7 / Firefox 30.0
I need to go to a specific cell using a macro.
I know how to do it "live" (Go To), but I can't do it with the macro, which I know the cell coordinates of (which change each time), but I can't specify it in the macro.
Thank you in advance for your help.
Best regards
Configuration: Windows 7 / Firefox 30.0
3 answers
-
Hello and hi Patrice
If you really want a macro
Range(adr).select
or
Cells(li,co).select
Best regards -
Hello,
to select it and make it visible in the window (scrolling):
Application.Goto [A1], True
eric
--
By trying continuously, you eventually succeed.
So the more it fails, the more chances we have that it works. (the Shadoks)
In addition to the thank you (yes, indeed, it's done!!!), remember to mark it as resolved. Thanks-
-
yes, exactly, I explained myself very poorly.
Let's say it's more to make the cells below and to the right visible.
If your last visible row is 36, .select selects it without scrolling. With application.goto ..., true you make the cells below and to the right visible.
It can be useful in certain cases.
eric
-
-
Hello,
To reach a cell, you only need to type its address directly into the name box (located to the left of the formula bar).
What is the point of using a macro that you have to run (1st action) and then input (for example via an input box) the cell address (2nd action) and finally validate, to achieve the same result???
--
Best regards
Patrice