View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] tmuldoon@spliced.com is offline
external usenet poster
 
Posts: 1
Default Multiple like statements?

Hello,

Is it possible to use more than one LIKE statment in an Excel Macro?

Here is what I have:

WHERE CAR.FAC_NO = HEAD.FAC_NO AND ((BALANCE.COMP='NIL') AND
(BALANCE.YEAR=2005) AND (BALANCE.PER_NO=99) AND (BALANCE.ACCOUNT Like
'5%') AND (HEAD.AREA like '333%'))

Which works...

But, I want to add more LIKE statments.

i.e. ....AND (HEAD.AREA like '666%') AND (HEAD.AREA like '999%'))

How ever I get errored out.

The LIKE statements grabs groups of number with a common beginning
three digits. But it seems I can only do it for only one set, number
multiple numbers.

Any suggestions?

Tmuld