Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
realspido
 
Posts: n/a
Default multi conditional searching

Guys,
please help me! I struggle with some problem:
I have a list:
date no code
12/4/6 101 AA
12/4/6 101 AB
12/4/6 102 AA
12/4/6 102 AA
12/4/6 102 AA
13/4/6 101 AA
13/4/6 101 AC
13/4/6 101 AB
13/4/6 102 AA
....
....

I'm trying to generate a list of codes matching to criteria, e.g.:
date no
13/4/6 101
Unfortunately function 'MATCH' can find a record using just one criteria,
and 'DGET' returns #NUM if there's more then one record matching the criteria.
What I need to get is:
AA
AC
AB
e.g. as array. Or if it's not possible at least first of the matching.
Is there any way to do it?
Thanks for any help.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default multi conditional searching

Assuming that A2:C10 contains the data...

Let E2 contain the date of interest, such as 13/4/06

Let F2 contain the number of interest, such as 101

Then try the following formulas...

G2:

=SUMPRODUCT(--(A2:A10=E2),--(B2:B10=F2))

H2, copied down:

=IF(ROWS(H$2:H2)<=$G$2,INDEX(C$2:C$10,SMALL(IF($A$ 2:$A$10=$E$2,IF($B$2:$B
$10=$F$2,ROW(C$2:C$10)-ROW(C$2)+1)),ROWS(H$2:H2))),"")

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
realspido wrote:

Guys,
please help me! I struggle with some problem:
I have a list:
date no code
12/4/6 101 AA
12/4/6 101 AB
12/4/6 102 AA
12/4/6 102 AA
12/4/6 102 AA
13/4/6 101 AA
13/4/6 101 AC
13/4/6 101 AB
13/4/6 102 AA
...
...

I'm trying to generate a list of codes matching to criteria, e.g.:
date no
13/4/6 101
Unfortunately function 'MATCH' can find a record using just one criteria,
and 'DGET' returns #NUM if there's more then one record matching the criteria.
What I need to get is:
AA
AC
AB
e.g. as array. Or if it's not possible at least first of the matching.
Is there any way to do it?
Thanks for any help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Herbert Seidenberg
 
Posts: n/a
Default multi conditional searching

Pivot Table, with totals hidden, will give you this:

date no AA AB AC
4/12/2006 101 1 1
102 3
4/13/2006 101 1 1 1
102 1

Name the 4x3 data field array1
and the 1x3 column field code2.
The array formula
=IF(array1=1,code2,"")
will give you this:

AA AB
AA
AA AB AC
AA

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
realspido
 
Posts: n/a
Default multi conditional searching

I was thinking about Pivot Table, but see, the problem is I need my
spreadsheet to work as fast as possible because it actually works as
database. All data are stored in one sheet as table and using macros and
second sheet containing formulas you can retrieve information from the table.
So all formulas must be as simple as posslible, otherwise moving from one
record to another takes ages...


"Herbert Seidenberg" wrote:

Pivot Table, with totals hidden, will give you this:

date no AA AB AC
4/12/2006 101 1 1
102 3
4/13/2006 101 1 1 1
102 1

Name the 4x3 data field array1
and the 1x3 column field code2.
The array formula
=IF(array1=1,code2,"")
will give you this:

AA AB
AA
AA AB AC
AA


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting when inserting a row zahoulik Excel Worksheet Functions 2 January 7th 06 03:01 PM
Conditional Format Not Working KMH Excel Discussion (Misc queries) 0 December 22nd 05 05:32 PM
Conditional formula - language needed gamebird Excel Worksheet Functions 7 October 10th 05 11:48 PM
VLOOKUP & Conditional Formating Help. Excel'ed Failures Excel Discussion (Misc queries) 6 August 16th 05 04:46 PM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 02:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"