else without if

  1. V

    Else without if Error, but I have an if?

    I am getting an else without if error, but I only have one if. Can anyone tell me what I am missing here? If Me.ComboBox1.Value > "" And Me.departure1.Value > "" Then Set myArray = ufd.Range("Truck_1") For z = 1 To i n = 0...
  2. C

    else without if error

    I'm not sure why I am getting this error message. I thought I had the correct indents, and I also made sure to have a new line after "then" in the if statements. Any suggestions? Here is my code Sub AddMilestone() Set s1 = ThisWorkbook.Worksheets("Release Input") Set s2 =...
  3. S

    Compile Error: Else without If

    Good morning all, I'm trying to create a calendar on excel. I'm not proficient in VBA at all but I was able to find a youtube video that matched what I wanted to do. I copied the code but now I'm getting this error: Compile Error: Else without If on this part of the code: 'determine what...
  4. J

    Else without If

    below is the macro i have but it is coming back with "Else without If" error I'm trying to create a macro that when a cell = USHMTrig then it takes the user to a certain cell on a particular sheet within the worksheet. Sub USHMTrigMac() If L8.Value = USHMTrig Then Do: Sheets("Example -...
  5. T

    If, ElseIf, Else Statements with Multiple Conditions

    Hi All! I have been experiencing this issue in a few macros I've created and don't understand what is wrong with any of the syntax structures I've been experimenting with. When I run the code, it doesn't compile and gives me a message that says "Else without If." From online research, it seems...
  6. Prevost

    Methods to deal with compile error: else without if

    Hi There, I am having trouble with finding what is actually wrong with my code in regards to a specific ELSE condition. It highlights the ELSE that is apparently not related to an IF statement. Unfortunately, I am the only one here that has a basic (maybe even very basic because I can't get...
  7. R

    A Compile error: Else without If and I don't know why and how to fix

    I'm trying to debug some code and I think the problem area is related to an ElseIf statement. The error message I get is: "Compile error: Else without If" and the row that is highlighed in the Visual Basic viewer is the ElseIf Line. Any help would be appreciated. 'This is option A to add...
  8. R

    Compile Error: Else without If (after Adding an Internal If Then Statement)

    The 2nd else does not attach to the first if, and the Next does not attach to the For Each. How do I correct this? - Thanks, Rowland For Each Cell In acct If Left(Cell, 2) = "43" Then 'change from Left(Cell, 3) = "400" Cell.Font.Bold = True IO = Left(Cell, 9) 'change from IO...

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