Else If Statements

AK_Excel_13

New Member
Joined
Jul 11, 2014
Messages
30
Why doesn't my else if statement work? I seems like it should work. The error I keep getting is "Else without If"

Application.ScreenUpdating = False
Set x = ActiveCell
Count = Range("a65536").End(xlUp).Row


For e = 2 To Count
If Cells(e, 10).Value = "A" Then Cells(e, 10).Value = "Yes"
Else: If Cells(e, 10).Value = "B" Then Cells(e, 10).Value = "No"
End If
End If
Next e


x.Select
Application.ScreenUpdating = True
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

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