#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Looping

MyUnit = InputBox("Unit")
If MyUnit Like "ACLG*" Then
MsgBox ("Large Bal")
ElseIf MyUnit Like "A*" Then
MsgBox ("Attorney")
End If

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"StephanieH" wrote in message
...
How can I set up a loop to evaluate data but end when it evaluates to
true?
For example, if MyUnit is "ACLG3" I only want the "Large Bal" message to
pop
up. I do not want it to go on to evaluate the second line of code. As it
is
currently written "ACLG3" will trigger both messages since the code sees
them
both.

MyUnit = InputBox("Unit")
If MyUnit Like "ACLG*" Then MsgBox ("Large Bal")
If MyUnit Like "A*" Then MsgBox ("Attorney")



Reply
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
Looping David T Excel Discussion (Misc queries) 2 August 30th 06 10:51 PM
Looping anderssweden Excel Programming 1 June 14th 06 03:00 PM
Looping Baffee Excel Programming 4 May 25th 06 06:57 PM
looping Neal Excel Programming 2 May 19th 06 10:27 PM
Looping Gusset Gadder Excel Programming 2 December 11th 04 09:16 PM


All times are GMT +1. The time now is 05:35 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"