Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
VLB
 
Posts: n/a
Default Searching for multiple results in one cell

I am trying to plot start and end dates. I am able to do this although I am
using a table that can have multiple entries to be plotted.

I am using this formula:
=IF(B$1=INDEX($B$13:$B$20,MATCH($A2,$A$13:$A$20,0) ),"S",IF(B$1=INDEX($C$13:$C$20,MATCH($A2,$A$13:$A$ 20,1)),"E",IF(AND(B$1INDEX($B$13:$B$20,MATCH($A2, $A$13:$A$20,0)),B$1<INDEX($C$13:$C$20,MATCH($A2,$A $13:$A$20,1))),"M","-")))

This is a nested IF that will search the List of names for a match, it will
then try and match the start date, then end date and finally if the date is
in between the two.

The problem I have is AA for example will have 2 entries, I want to plot
both Entries on a particular row although after the matches finds the first
Match, it stops looking.

Is there anyway to have a formula where is will look for a match, and
continue looking through out the array.

In a programming sense I would want an IF Loop Until it reaches end of array
or meets critera.

Below is an illustration of the table.

1 2 3 4 5 6
AA S M E - - -
BB - S M M E -
CC - - - - S M
DD - - S M M E
EE - S M M M E
FF - E S - - -
CC - - - - S M



Name Sdate Edate
AA 1 3
BB 2 5
CC 5 8
DD 3 6
EE 2 6
FF 3 2
AA 1 6
CC 1 5

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default Searching for multiple results in one cell

Try the following...

1) First, define the following reference...

Select B2 (needs to be the active cell)

Insert Name Define

Name: RowNum

Refers to:

=SMALL(IF(Sheet1!$A$13:$A$20=Sheet1!$A2,ROW(Sheet1 !$A$13:$A$20)-ROW(Sheet
1!$A$13)+1),COUNTIF(Sheet1!$A$2:$A2,Sheet1!$A2))

Click Ok

2) Enter the following formula in B2, copy across, and down:

=IF(B$1=INDEX($B$13:$B$20,RowNum),"S",IF(B$1=INDEX ($C$13:$C$20,RowNum),"E
",IF(AND(B$1INDEX($B$13:$B$20,RowNum),B$1<INDEX($ C$13:$C$20,RowNum)),"M"
,"-")))

Hope this helps!

In article ,
VLB wrote:

I am trying to plot start and end dates. I am able to do this although I am
using a table that can have multiple entries to be plotted.

I am using this formula:
=IF(B$1=INDEX($B$13:$B$20,MATCH($A2,$A$13:$A$20,0) ),"S",IF(B$1=INDEX($C$13:$C$
20,MATCH($A2,$A$13:$A$20,1)),"E",IF(AND(B$1INDEX( $B$13:$B$20,MATCH($A2,$A$13:
$A$20,0)),B$1<INDEX($C$13:$C$20,MATCH($A2,$A$13:$A $20,1))),"M","-")))

This is a nested IF that will search the List of names for a match, it will
then try and match the start date, then end date and finally if the date is
in between the two.

The problem I have is AA for example will have 2 entries, I want to plot
both Entries on a particular row although after the matches finds the first
Match, it stops looking.

Is there anyway to have a formula where is will look for a match, and
continue looking through out the array.

In a programming sense I would want an IF Loop Until it reaches end of array
or meets critera.

Below is an illustration of the table.

1 2 3 4 5 6
AA S M E - - -
BB - S M M E -
CC - - - - S M
DD - - S M M E
EE - S M M M E
FF - E S - - -
CC - - - - S M



Name Sdate Edate
AA 1 3
BB 2 5
CC 5 8
DD 3 6
EE 2 6
FF 3 2
AA 1 6
CC 1 5

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
abdualmohsn almedrahe abdualmohsn ahmad Excel Discussion (Misc queries) 1 November 19th 05 06:32 PM
cell searching thephoenix12 Excel Discussion (Misc queries) 6 June 20th 05 04:44 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
VLOOKUP - results do not appear in cell denvertique Excel Worksheet Functions 1 April 22nd 05 11:41 PM
I want the results of a formula to show in cell, NOT THE FORMULA! ocbecky Excel Discussion (Misc queries) 4 December 10th 04 08:39 PM


All times are GMT +1. The time now is 09:34 AM.

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"