ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Else: (https://www.excelbanter.com/excel-programming/294278-else.html)

bob

Else:
 
I just took over an excel spreadsheet from a guy who got
fired. In one of his macros he is using a series of
nested if statements and at the end of his if he puts
Else: and then ends the if with an EndIf. Is this Else:
statement necessary? Does the colon indicate an end of
executables under the else?

Lawson

Else:
 
in most cases, else is only necessary if its possible for
there to be an else. if ther is, and the program comes
across it, the program will jsut end - no problems

hope that helps!

ps: was it necessary to tell everyone about the firing of
a coworker? haha

-----Original Message-----
I just took over an excel spreadsheet from a guy who got
fired. In one of his macros he is using a series of
nested if statements and at the end of his if he puts
Else: and then ends the if with an EndIf. Is this Else:
statement necessary? Does the colon indicate an end of
executables under the else?
.


larryN

Else:
 
The colon after the Else allows statements to be on one
line.

If <something here Then <do this Else:End If

The Else above is not necessary.


If <something here Then <do this Else: <do this End If

Keep the Else in the statement above

-----Original Message-----
I just took over an excel spreadsheet from a guy who got
fired. In one of his macros he is using a series of
nested if statements and at the end of his if he puts
Else: and then ends the if with an EndIf. Is this Else:
statement necessary? Does the colon indicate an end of
executables under the else?
.


bob

Else:
 
Thanks! That's what I thought but I justed wanted to make
sure and no one here had seen that syntax before. Thanks
again!
-----Original Message-----
The colon after the Else allows statements to be on one
line.

If <something here Then <do this Else:End If

The Else above is not necessary.


If <something here Then <do this Else: <do this End If

Keep the Else in the statement above

-----Original Message-----
I just took over an excel spreadsheet from a guy who got
fired. In one of his macros he is using a series of
nested if statements and at the end of his if he puts
Else: and then ends the if with an EndIf. Is this Else:
statement necessary? Does the colon indicate an end of
executables under the else?
.

.


bob

Else:
 
Thanks!

Yes, I thought it necessary to rub it in. ;)

-----Original Message-----
in most cases, else is only necessary if its possible for
there to be an else. if ther is, and the program comes
across it, the program will jsut end - no problems

hope that helps!

ps: was it necessary to tell everyone about the firing of
a coworker? haha

-----Original Message-----
I just took over an excel spreadsheet from a guy who got
fired. In one of his macros he is using a series of
nested if statements and at the end of his if he puts
Else: and then ends the if with an EndIf. Is this Else:
statement necessary? Does the colon indicate an end of
executables under the else?
.

.



All times are GMT +1. The time now is 10:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com