Application.Goto

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
It's not clear what you are trying to do. Can you provide more detail?
 
Upvote 0
Well, when I run the visual basic recorder, I copy a set of vertical cells. From there I go to find-Goto-and select a referenced cell that I've "named" and then special paste to that named cell. Now I have have to be able to have the user select the named reference, but when I run the macro, instead of stopping, it selects the same from the list and didn't even stop.

Application.Goto Reference=:("n_fourteen")


I've had an old macro before this and doesn't run on 2016.

Formula.Goto?()
Something like that which allowed the user to select.
 
Upvote 0
I think you should tell us what your wanting to do and we will suggest and provide a way we think you should do things.

Instead of you using a Macro recorder script and then trying to modify it to do what you want.
If you want to copy a range and paste it some place else you should not need a find and Goto function.
 
Upvote 0
If you know how to read scripts look at these two and see if they might do what you want.
Modify to your needs:

The second script allows you to enter the named range.

Code:
Sub Copy_My_Data()
Application.ScreenUpdating = False
Sheets("Data").Range("A1:A20").Copy Destination:=Sheets("Copy Two").Range("Sam")
Application.ScreenUpdating = True
End Sub

Code:
Sub Copy_My_Data_With_Input_Box()
Application.ScreenUpdating = False
Dim ans As String
ans = InputBox("Enter Named Range")
Sheets("Data").Range("A1:A20").Copy Destination:=Sheets("Copy Two").Range(ans)
Application.ScreenUpdating = True
End Sub
 
Last edited:
Upvote 0
It's a summary sheet for my business book keeping. I'm Moving the current days info cells Q55:Q97 to a separate section with named cells one through twenty-eight(T2:AU2) on the same sheet with copy, special paste-value. With my old macro, the macro would stop in the Goto function to allow me to select the named cell of my choosing. I have to have it this way as I'm not the sole user of this. I'm trying to avoid making two separate macros to complete my whole clearing and moving of data to prevent mistakes from other, less computer savvy employees. :) But the kicker is, it's not the same cell everyday, which is why i need to be able to select the named cell. Otherwise, it just writes over the information over and over.


Sub CLEAR_DAILY_BOOKWORK1()
'
' CLEAR_DAILY_BOOKWORK1 Macro
'


'
Sheets("HDE TOTAL DAILY SALES").Select
ActiveSheet.Unprotect
ActiveWorkbook.Save
Sheets("DAY TILS").Select
ActiveWorkbook.Save
Sheets("NIGHT TILS").Select
ActiveWorkbook.Save
Sheets("HDE TOTAL DAILY SALES").Select
Range("B2:L53").Select
ActiveSheet.PageSetup.PrintArea = "$B$2:$L$53"
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = "$B$2:$L$53"
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.7)
.RightMargin = Application.InchesToPoints(0.7)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.3)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = True
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
Application.PrintCommunication = True
Range("B54:L129").Select
ActiveSheet.PageSetup.PrintArea = "$B$54:$L$129"
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = "$B$54:$L$129"
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.7)
.RightMargin = Application.InchesToPoints(0.7)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.3)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = True
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
Application.PrintCommunication = True
Range("Q55:Q97").Select
Selection.Copy
Application.Goto Reference:="n_FOURTEEN"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("Z21").Select



End Sub
 
Upvote 0

Forum statistics

Threads
1,214,896
Messages
6,122,132
Members
449,066
Latest member
Andyg666

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