Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Conditional Indexing

I'm using the below Indexing w/ matching function to find entries that meet a
criteria. But now I find that i have to take it one step further... I have
to exclude entries that have an adjacent cell in the same row where the first
four letters are PASS. How would I make the below indexing function skip all
results that start with the work "PASS" and move on until it finds a result
that does not have PASS as the first four characters?

=IF(D3="","",IF(ISNA(INDEX(Sheet3!A:A,MATCH(D3,She et3!B:B,0))),"None
Found",INDEX(Sheet3!A:A,MATCH(D3,Sheet3!B:B,0))))

I'm trying this...

=IF(LEFT(INDEX(Sheet3!D:D,MATCH(D3,Sheet3!B:B,0)), 4)="PASS",????,INDEX(Sheet3!A:A,MATCH(D3,Sheet3!B: B,0)))
--- Where the four question marks are, I do not know what to put there to
make it keep looking for the next appropriate value.


Any help would be much appreciated.
Rob
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Conditional Indexing

I believe this will work for you:

=IF(D3="","",IF(ISERROR(INDEX(Sheet3!A:A,SUMPRODUC T((ROW($A1:$A$65535))*($B1:$B$65535=D3)*(LEFT($D1: $D$65535,4)<"PASS")))),"None
Found",INDEX(Sheet3!A:A,SUMPRODUCT((ROW($A1:$A$655 35))*($B1:$B$65535=D3)*(LEFT($D1:$D$65535,4)<"PAS S")))))

Couple things to note: The SUMPRODUCT function can't callout an entire
column (unless using XL2007). That why I only call out to row 65535, and not
65536 (XL would automatically change it to a column reference, thus screwing
things up). Also, because those arrays are fairly large, it makes this
formula more calculation intensive, slowing things down, unfortunately. To
help with this, you could reduce the size of the arrays to whatever is
actaully needed (perhaps 1:1000?). The nice thing is that it won't affect the
rest of your formula.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Rob" wrote:

I'm using the below Indexing w/ matching function to find entries that meet a
criteria. But now I find that i have to take it one step further... I have
to exclude entries that have an adjacent cell in the same row where the first
four letters are PASS. How would I make the below indexing function skip all
results that start with the work "PASS" and move on until it finds a result
that does not have PASS as the first four characters?

=IF(D3="","",IF(ISNA(INDEX(Sheet3!A:A,MATCH(D3,She et3!B:B,0))),"None
Found",INDEX(Sheet3!A:A,MATCH(D3,Sheet3!B:B,0))))

I'm trying this...

=IF(LEFT(INDEX(Sheet3!D:D,MATCH(D3,Sheet3!B:B,0)), 4)="PASS",????,INDEX(Sheet3!A:A,MATCH(D3,Sheet3!B: B,0)))
--- Where the four question marks are, I do not know what to put there to
make it keep looking for the next appropriate value.


Any help would be much appreciated.
Rob

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 265
Default Conditional Indexing

In article ,
Rob wrote:

I'm using the below Indexing w/ matching function to find entries that meet a
criteria. But now I find that i have to take it one step further... I have
to exclude entries that have an adjacent cell in the same row where the first
four letters are PASS. How would I make the below indexing function skip all
results that start with the work "PASS" and move on until it finds a result
that does not have PASS as the first four characters?

=IF(D3="","",IF(ISNA(INDEX(Sheet3!A:A,MATCH(D3,She et3!B:B,0))),"None
Found",INDEX(Sheet3!A:A,MATCH(D3,Sheet3!B:B,0))))

I'm trying this...

=IF(LEFT(INDEX(Sheet3!D:D,MATCH(D3,Sheet3!B:B,0)), 4)="PASS",????,INDEX(Sheet3!
A:A,MATCH(D3,Sheet3!B:B,0)))
--- Where the four question marks are, I do not know what to put there to
make it keep looking for the next appropriate value.


Any help would be much appreciated.
Rob


Try the following array formula, which needs to be confirmed with
CONTROL+SHIFT+ENTER...

=IF(D3<"",IF(ISNUMBER(MATCH(1,IF(Sheet3!B2:B100=D 3,IF(LEFT(Sheet3!D2:D10
0,4)<"Pass",1)),0)),INDEX(Sheet3!A2:A100,MATCH(1, IF(Sheet3!B2:B100=D3,IF
(LEFT(Sheet3!D2:D100,4)<"Pass",1)),0)),""),"")

Note that unless you're using Excel 2007, the array formula will not
accept whole column references. Also, if you're using Excel 2007,
IFERROR can be used instead of ISNUMBER/MATCH to trap errors.

--
Domenic
http://www.xl-central.com
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
Indexing Anto111 Excel Discussion (Misc queries) 1 July 26th 08 08:01 PM
Tab indexing ibgolfn Excel Discussion (Misc queries) 2 January 16th 08 12:04 AM
Indexing M&M[_2_] Excel Discussion (Misc queries) 1 July 13th 07 07:10 PM
Indexing of Name Charlie Excel Worksheet Functions 1 April 5th 06 01:33 PM
Indexing a row ecohen1 Excel Worksheet Functions 6 July 20th 05 06:11 PM


All times are GMT +1. The time now is 10:46 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"