goto

  1. S

    Trying to figure out how to use VBA Goto

    I have no experience with VBA Goto although it seems like this is my only option. I am trying to use a series of cell addresses to enter a value "RTS" in the cell next to the cell addresses. I was wondering how I can achieve this. Thanks in advance
  2. Gerald Higgins

    Problem with Application.DisplayAlerts = False

    Thanks in advance for any help ! So I've got a master file, and am writing some code to open individual files one at a time for each of a number of other company locations, suck data from them into the master file, do some other changes to the individual location files, close each of them down...
  3. D

    VBA Application.Goto Macro

    I have researched this for several hours and attempted every option and fix I could find or think of, and having failed I figure it's time to ask about my specific need. I have a formula in cell D2 of sheet7("Missions") that first chooses a table from six table options on the same worksheet...
  4. P

    VBA - Behavior of On Error Resume <Label> within For Loop

    I am completely intrigued by this apparently a very simple code. I guess I need to understand how really On Error GoTo <Label> works when put within a For Next loop. This code obviously goes into runtime error at j = 7/0. However on the first iteration For i = 1, it successfully goes to Label...
  5. A

    VBA macro running slow/crashing when autofilling with a UDF

    Hi, I need to a turnaround today if possible please. Thanks in advance. I have a file that runs a macro, the macro is taking far too long to execute. However, if I step through the macro it works as quickly as it should stepping through. It slows down once it hits the Autofill part of the...
  6. B

    Refer to a Range using offset to determine next action

    I am changing around a sheet where previously the cells I needed to index around where fixed at the top because each week we would insert and push down the prior weeks data. Now the new data will be added at the bottom and I'd like to use a date reference in M1 to search a date range in Column...
  7. K

    use vba for filter if contains

    Hello , i'm using the following vba to make the raw no. 2 is the filter key (it means that any column will be auto filtered based on the value entered in raw no.2) i need to use the same but the filter will be based on (if contains) not (equal) any help?? Private Sub Worksheet_Change(ByVal...
  8. C

    Comparing two range of dates

    Hey everyone, So I have a bit of a conundrum with a code I've been working on. So currently I have this code running: Option Explicit Public SelectItem3 As String, pos3 As Long Private Sub AddDate() Dim b As Object, RowNumber As Integer Set b = ActiveSheet.Buttons(Application.Caller)...
  9. T

    On Error GoTo 0

    In the sub below, should the On Error GoTo 0 be placed immediately after the line that might cause an error or should it be placed at the end, or indeed in both places? On Error GoTo Errhandler Worksheets("Sheet10").Activate 'On Error GoTo 0 'SHOULD THIS BE PLACED...
  10. 1

    Anothe hopefully simple vba fix

    Hi all, I have inherited a file that I have made a small number of changes to. Now, when I run the macro, I keep getting the message box appear saying "please check data in row 10". Sorry it's a bit long. Thanks in advance. Sub validation(errorcheck) errorcheck = False RecordCount =...
  11. S

    Compile Error: Loop Without Do - Looping with multiple GoTo statements

    Greetings, I am receiving a loop without Do error at the second "loop". Is it possible to loop to the same initial "Do Until" statement from more than one point? I would like to loop back to the initial point from each GoTo statement. k = Range(Cells(Rows.End(xlUp), b)) Do Until k =...
  12. S

    Compile Error: Sub or Function not Defined - GoTo

    Greetings, This is what I'm working with... If Range(Cells(k, b)) <> "" Then GoTo First Else GoTo Second First Set h = Range(Cells(k, k.End(xlToRight))) k = k - 1 End If Loop Second h.Copy...
  13. L

    Exceeded Nest In If Function

    Hello first time poster. I have exceeded the nest limit for an IF function and I was wondering if someone could help me come up with a solution. I don't mind creating another sheet and then using the VLookup or if there is something better. I am trying to do this in VBA and the only input would...
  14. C

    On Error Goto Errhandler: not working

    I'm kind of surpised this doesn't work. I'm getting the 91 error when WellIDRow doesn't find what it's looking for, which I expected, that is why I put in the error handing. If it can't find the number then it should skip and go to the next "a". However, I'm still getting the "pop-up" of the...
  15. C

    In project explorer which name is the codename?

    A reputable source states "...The first name for each worksheet outside the parentheses is sheet code name . In nearly all circumstances in VBA, you can use the code name anywhere you would normally use Worksheet("SheetName"). The following code shows MsgBox "MAIN.Name OK" MsgBox "sheet1.name...
  16. M

    Do Until Loop + Then GoTo Skip

    Hello, I am still quiet new to VBA. I am working with a spreadsheet that requires me to Divide one column by another (eg. G2/F2, G3/F3, G4/F4...). I'm having trouble getting "Then GoTo" skip to work in my code. If a cell in column "G" or column "F" has the variable "$0.00", i would like to...
  17. O

    right angle triangle calculator - problems

    this code finds 2 non hypotenuse sides that form a right angle triangle then checks if it is a multiple of a previous "find". it finds nothing after 65 72 97 ie it does not find 65 156 169. J column is a list of prime numbers below 100 Sub Macro4() ' ' Macro4 Macro ' Macro recorded...
  18. T

    Multiple error handling

    I think neither methods below is ideal but of the two, which would be preferable? Option Explicit Sub FirstMethod() On Error GoTo FirstErrhandler ' Do something first On Error GoTo 0 On Error GoTo SecondErrhandler ' Do something second On Error GoTo 0...
  19. S

    Use of goto

    Hi all is there a better way of doing this ? as I was always taught to avoid the "goto" instruction MSG1 = MsgBox("Pressing this will COMPLETELY replace ALL of the data in the 'Tabs'" & vbCrLf & "Continue ?", vbYesNo, "Sort raw Data") If MSG1 = vbYes Then GoTo jump Else End End If...

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