View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Abdul[_6_] Abdul[_6_] is offline
external usenet poster
 
Posts: 8
Default Query from another sheet in same Workbook

Thanks Stephen Bullen

It is not what i want.. I have several criteria to look
in my actual file, more than ten. I was just giveing a
kelton in my post

Thanks
Abdul

-----Original Message-----
Hi Abdul,

I am prefering this way since i have to use several
criteria ( too complicated to use filter)

Is there better way than this?


Personally, I would use an AdvancedFilter instead of a

QueryTable for this. It seems a fairly simple Criteria
Range.

A B C D E
1 A b SR lDate lDate
2 005G N S =12345 <=12356
3

So you'd populate D2 and E2 with your dates:
Range("D2").Value = "=" & CLng(lDt1)
Range("E2").Value = "<=" & CLng(lDt1)

Then do a Range.AdvancedFilter (record it to get the

syntax correct).

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk


.