Thread: Case function
View Single Post
  #5   Report Post  
David McRitchie
 
Posts: n/a
Default

Hi Al,
It is part of a macro, here is an example that is an event macro
http://www.mvps.org/dmcritchie/excel/event.htm#case
even though event macros are not the most common macros they
are easier to install. This particular macro would be triggered by
entering a constant into a cell (as opposed to a value changing due
to a formula).
installed by right click on sheet tab, view code, place code inside.

Some information on standard macro installation and use
http://www.mvps.org/dmcritchie/excel/getstarted.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Al" wrote in message ...
Bob,
Pardon my ignorance but how do I call the myVal routine from within Excel?

"Bob Phillips" wrote:

In VBA, yes


Select Case myVal
Case 1: 'do something
Case 2: 'do something else
Case Else; ' exception
End Select

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Al" wrote in message
...
Does Excel have a function similar to the "Case" command in other

programming
languages?