View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nikos Yannacopoulos[_2_] Nikos Yannacopoulos[_2_] is offline
external usenet poster
 
Posts: 9
Default Hopefully simple Select Case error

Wrong syntax...
Use a variable, say, crtr, to hold your case criterion
value, and then:

SELECT CASE crtr
CASE "Criteria 1"
Cell.Offset(0, 1).Valuelike "*AdditionalCriteria*"
CASE "Criteria 2"
Cell.Offset(0, 1).Value Like "Additional Criteria"
CASE ....
action....
CASE ELSE
action if none of the above satisfied / Optional
End SELECT

Nikos Y.
-----Original Message-----
Can anybody help explain why this part of my Select Case

statement won't
work? First time using Select Case so please excuse me if

this is
glaringly obvious!

Case "Criteria 1" And _
Cell.Offset(0, 1).Valuelike "*AdditionalCriteria*"

Case "Criteria 2" And _
Cell.Offset(0, 1).Value Like "Additional Criteria"

Thanks,

Adrian



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from

http://www.ExcelForum.com/

.