Compile Error: Block If without End if
Thanks for your explanations.
This is no VBA job (too slow)
You'd rather enter the following formula into M2 et copy it down to M999:
=IF(K2=2;"FedEx Ground;IF(K2=3,"FedEx 2Day","")
HTH
--
AP
a écrit dans le message de
oups.com...
This is my first time using a Microsoft Excel Macro and I'm trying to
run the following code and keep getting the:
Compile Error: Block If without End if message and I can't figure out
why
Sub P()
'
' Macro1 Macro
' Changing FedEx Descriptions
'
' Keyboard Shortcut: Ctrl+Shift+X
'
If Range("K2:K999").Select = "02" Then
Range("M2:M999").Select = "FedEx Ground"
Else
If Range("K2:K999").Select = "03" Then
Range("M2:M999").Select = "FedEx 2Day"
Else
If Range("K2:K999").Select = "" Then
Range("M2:M999").Select = ""
End If
End Sub
|