LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multiple commands from single IF.

Now, I know if I write some functions then this will be alot easier, bu
I want to do some IF's that run multiple commands. It should be quit
easy, but I don't know what Excel wants.

Here's an example of how I "think" it, when I'm doing this in my head.

IF (Condition = True)
Then
{
Command1
Command2
Command3
}
Else
{
Command4
Command5
}


I suppose the function way to do it would be

If (Condition = True) Then Truestuff() Else Falsestuff()

With
Sub Truestuff()
Command1
Command2
Command3
End Sub

Sub Falsestuff()
Command4
Command5
End Sub

That's the other way I can do it. Is there any way to nest multipl
commands in a single If Then Else set?

Hope that makes sense, Thanks for the help.

-Bo

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumproduct, single criteria identified within multiple in single c Monte Excel Discussion (Misc queries) 4 July 18th 09 11:21 PM
multiple rows to single row Abhay Excel Discussion (Misc queries) 6 January 20th 09 11:10 AM
Multiple formats in a single cell with multiple formulas Zakhary Excel Worksheet Functions 1 May 2nd 08 12:08 AM
Printing single pages from multiple worksheets in a single print job [email protected] Excel Discussion (Misc queries) 2 April 27th 07 06:11 PM
Find Multiple instances of Single Criterion in Row & Return To a Single Col Sam via OfficeKB.com Excel Worksheet Functions 16 May 10th 06 03:00 AM


All times are GMT +1. The time now is 11:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"