View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Learn-more Learn-more is offline
external usenet poster
 
Posts: 25
Default Use VBA to display record with criteria

Hi Mike,

Thanks for the information. However, the file is big and what I need to do
is only to display the records meeting the criteria and not to display those
failed the checking. Also display each record is more important then the
total for Column D

It is also good if some functions can work it out.
Thanks.

"Mike H" wrote:

Hi,

You don't need VB, try this on any sheet with your data in sheet 2

=SUMPRODUCT((Sheet2!A1:A4="Apple")*(Sheet2!B1:B4=" One")*(Sheet2!D1:D4))

Mike

"Learn-more" wrote:

I know only a little about using VBA and now have a problem not sure how to
work it out. I need to display some records in a new sheet according to some
criteria,

Example in Sheet A
A B C D
1 Apple one Mon 1
2 Banana two Tue 2
3 Apple two Wed 5
4 Apple one Thu 6

Say I need to display in Sheet B the records that satisfy A=Apple and B=one
and also with a total for D

I know how to use ComboBox etc to crate the list but dont know how to make
the selection and move to a new sheet.

Can anyone tell me how or show me some web site that I can find some examples.
Thanks so much.