Thread: Multiple IF 's
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mark Scureman Mark Scureman is offline
external usenet poster
 
Posts: 1
Default Multiple IF 's

Hi Frank,

Would this work the same way for a text value? If H25 contained a list of product names and you wanted run different code based on which of those names was chosen, would you have to do anything differently since it's a non-numeric value?

TIA,
Mark

----- Frank Kabel wrote: -----

Hi Hans
try something like the following

sub foo()

select case range("H25").value
case 100
ID100
case 120
ID120
case else
msgbox "Sorry, not in list"
end select
end sub


--
Regards
Frank Kabel
Frankfurt, Germany


Hans Weustink wrote:
Hi,
I would like a macro to be selected based upon the value

of a cell.

-- snip --