Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default INDEX, MATCH, IF function does not work

Hi

I have a table with two columns, much like stock quotes. Column A holds the time in ascending order. Column B holds the values, which are pretty much at random, just like stock quotes. I want to find the first appearance of a certain value AFTER a certain time.

The INDEX MATCH function does just that but I cannot get the time criteria in there.

Here is what I do:

=INDEX(A:A;MATCH(C1;IF(A:AC2;B:G);0))

A = time column (ascending order)
B = value column (random order)
C1 = value to look for
C2 = time after which the values first appearance I want to know (not before that time)

The whole thing kept me busy for a couple of days now, without any solution besides adding extra columns. That is not an option because I have a couple of hundred tables which waists to much of my time and data power.

I would appreciate every thought on that.

Thanks in advance.

Michael

EggHeadCafe - Software Developer Portal of Choice
Build a C# SQL Server Database Export Utility
http://www.eggheadcafe.com/tutorials...erver-dat.aspx
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 915
Default INDEX, MATCH, IF function does not work

Michael wrote:
Hi

I have a table with two columns, much like stock quotes. Column A holds the time in ascending order. Column B holds the values, which are pretty much at random, just like stock quotes. I want to find the first appearance of a certain value AFTER a certain time.

The INDEX MATCH function does just that but I cannot get the time criteria in there.

Here is what I do:

=INDEX(A:A;MATCH(C1;IF(A:AC2;B:G);0))

A = time column (ascending order)
B = value column (random order)
C1 = value to look for
C2 = time after which the values first appearance I want to know (not before that time)

The whole thing kept me busy for a couple of days now, without any solution besides adding extra columns. That is not an option because I have a couple of hundred tables which waists to much of my time and data power.

I would appreciate every thought on that.

Thanks in advance.

Michael

EggHeadCafe - Software Developer Portal of Choice
Build a C# SQL Server Database Export Utility
http://www.eggheadcafe.com/tutorials...erver-dat.aspx


Try this out; must be array-entered*:

=INDEX($B$2:$B$9999,MATCH(1,--($C$1<=$A$2:$A$9999),0))

*Array-entry: commit the formula by holding down Ctrl and Shift while
you tap Enter.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Thanks

Hi smartin
Thanks for the reply. I don?t really get your formula, as I am looking for the time when the value appears for the first time. MATCH should not start comparing with the first time value, but e.g. 1 hour later.
Am I supposed to copy your formula down due to the $-sign?
Best regards
Michael



smartin wrote:

Michael wrote:Try this out; must be
05-nov-09

Michael wrote:

Try this out; must be array-entered*:

=INDEX($B$2:$B$9999,MATCH(1,--($C$1<=$A$2:$A$9999),0))

*Array-entry: commit the formula by holding down Ctrl and Shift while
you tap Enter.

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
Useful Vista Tweaks
http://www.eggheadcafe.com/tutorials...ta-tweaks.aspx
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 915
Default Thanks

My bad: I read the requirement backwards.

Revised formula (no array-entry needed): Return the next time in column
A where the value in C1 matches a value in column B:

=INDEX($A$2:$A$9999,1+MATCH(C1,B2:B9999,0))


Michael wrote:
Hi smartin
Thanks for the reply. I don?t really get your formula, as I am looking for the time when the value appears for the first time. MATCH should not start comparing with the first time value, but e.g. 1 hour later.
Am I supposed to copy your formula down due to the $-sign?
Best regards
Michael



smartin wrote:

Michael wrote:Try this out; must be
05-nov-09

Michael wrote:

Try this out; must be array-entered*:

=INDEX($B$2:$B$9999,MATCH(1,--($C$1<=$A$2:$A$9999),0))

*Array-entry: commit the formula by holding down Ctrl and Shift while
you tap Enter.

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
Useful Vista Tweaks
http://www.eggheadcafe.com/tutorials...ta-tweaks.aspx


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
INDEX w. MATCH function dannyboy8 Excel Worksheet Functions 8 November 25th 08 10:33 PM
Need help with function using INDEX and MATCH. Sean.rogers[_2_] Excel Worksheet Functions 2 April 24th 08 04:53 PM
Match and Index function Gary Reger Excel Worksheet Functions 2 February 15th 07 07:24 PM
index match array function-returning only first match, need last. Julie Olsen Excel Worksheet Functions 3 December 29th 06 12:50 AM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM


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