LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default conditional MAX associated row data

All the arrays should have the same number of rows:

=INDEX(A2:A9999, MATCH(MAX((B2:B9999=60)*C2:C9999),
(B2:B9999=60)*C2:C9999, FALSE))

In article om,
"toolbox" wrote:

Thanks so much for your reply JE. The formula you provided works
great for me, but I have encountered one additional problem. The
formula contains the range "C2:C6", which is the current number of
rows in my table. I expect to add new rows to my table frequently.
However, if I alter the forumla to include rows that do not exist yet,
then the formula produces an error. Because the number of rows is
hardcoded in this formula, I would need to update the formula each
time I add a new row of data to the table. Can you think of a way to
either make the formula calculate the number of data rows to look at,
or to alter the formula so that it does not produce an error if it
encounters a blank row?

/* Work great assuming my last data is in row 6 */
=INDEX(A2:A6,MATCH(MAX((B2:B6=60)*C2:C6),(B2:B6= 60)*C2:C6,FALSE))

/* Produces an error when no data exists in rows 7 through 9999 */
=INDEX(A2:A6,MATCH(MAX((B2:B6=60)*C2:C9999),
(B2:B6=60)*C2:C9999,FALSE))



 
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
need help with conditional data Alok Excel Worksheet Functions 1 September 19th 08 01:00 PM
Conditional Data Validation evoxfan Excel Worksheet Functions 4 September 19th 08 12:13 AM
Conditional data Valerian Excel Worksheet Functions 5 March 27th 06 12:33 AM
conditional data validation RickS Excel Worksheet Functions 6 December 16th 05 01:11 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 05:28 AM.

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

About Us

"It's about Microsoft Excel"