#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Match

I have a spread sheet with 5000 lines.
Column A has 1000 different part numbers (P/N)
Column C has MTBF data for the 5000 line.
Column D has “Actual” or “Estimated”
Column E has max MTBF value from “C” for the P/N in “A” {=MAX(IF(A$2:A
$5050=A3,C$2:C$5050))}

What I am now trying to do unsuccessfully is obtain the “Actual” or
“Estimated” in Column F based on the MAX values returned in Column
“E”. Can someone help?

Also, if the MAX values returned for a given part number has both
“Actual” and “Estimated” the default should be “Actual”.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Match

On the face of it, think you could try an index n match,
like this, array-entered*, then copied down:
=INDEX(F$2:F$5050,MATCH(MAX(IF(A$2:A$5050=A3,C$2:C $5050)),IF(A$2:A$5050=A3,C$2:C$5050),0))

*press CTRL+SHIFT+ENTER to confirm the formula

And if you need to include an additional criteria based on what's in col D,
eg: Actual, then try something like this, array-entered:
=INDEX(F$2:F$5050,MATCH(MAX(IF((A$2:A$5050=A3)*(D$ 2:D$5050="Actual"),C$2:C$5050)),IF((A$2:A$5050=A3) *(D$2:D$5050="Actual"),C$2:C$5050),0))

Likewise for "Estimated"
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,400 Files:358 Subscribers:55
xdemechanik
---
"B~O~B" wrote in message
...
I have a spread sheet with 5000 lines.
Column A has 1000 different part numbers (P/N)
Column C has MTBF data for the 5000 line.
Column D has “Actual” or “Estimated”
Column E has max MTBF value from “C” for the P/N in “A” {=MAX(IF(A$2:A
$5050=A3,C$2:C$5050))}

What I am now trying to do unsuccessfully is obtain the “Actual” or
“Estimated” in Column F based on the MAX values returned in Column
“E”. Can someone help?

Also, if the MAX values returned for a given part number has both
“Actual” and “Estimated” the default should be “Actual”.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 915
Default Match

B~O~B wrote:
I have a spread sheet with 5000 lines.
Column A has 1000 different part numbers (P/N)
Column C has MTBF data for the 5000 line.
Column D has “Actual” or “Estimated”
Column E has max MTBF value from “C” for the P/N in “A” {=MAX(IF(A$2:A
$5050=A3,C$2:C$5050))}

What I am now trying to do unsuccessfully is obtain the “Actual” or
“Estimated” in Column F based on the MAX values returned in Column
“E”. Can someone help?

Also, if the MAX values returned for a given part number has both
“Actual” and “Estimated” the default should be “Actual”.


This is not complete--I don't have the tie-breaker figured out yet.


First off, I'm using cells E2 and F2, and a range of data in A2:D5001.

E2 is Max MTBF by p/n:
{=MAX(IF($A2=$A$2:$A$5001,$C$2:$C$5001))}

This provides the data row where the Max was found:
{=MATCH(1,($A2=$A$2:$A$5001)*($E2=$C$2:$C$5001),0) }

Rolling that into F2, we get the Actual or Estimated category from D:
{=INDEX($D$2:$D$5001,MATCH(1,($A2=$A$2:$A$5001)*($ E2=$C$2:$C$5001),0),1)}

Now, hmm...
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 915
Default Match

Max wrote:
On the face of it, think you could try an index n match,
like this, array-entered*, then copied down:
=INDEX(F$2:F$5050,MATCH(MAX(IF(A$2:A$5050=A3,C$2:C $5050)),IF(A$2:A$5050=A3,C$2:C$5050),0))

*press CTRL+SHIFT+ENTER to confirm the formula

And if you need to include an additional criteria based on what's in col D,
eg: Actual, then try something like this, array-entered:
=INDEX(F$2:F$5050,MATCH(MAX(IF((A$2:A$5050=A3)*(D$ 2:D$5050="Actual"),C$2:C$5050)),IF((A$2:A$5050=A3) *(D$2:D$5050="Actual"),C$2:C$5050),0))

Likewise for "Estimated"


Aha, following the formula auditor at last I see what I was doing wrong.

For "Actual":
=INDEX(C$2:C$5050,MATCH(MAX(IF((A$2:A$5050=A3)*(D$ 2:D$5050="Actual"),C$2:C$5050)),IF((A$2:A$5050=A3) *(D$2:D$5050="Actual"),C$2:C$5050),0))
^ ^

And, as you say, likewise for "Estimated"

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Match

On Aug 19, 9:40*pm, smartin wrote:
Max wrote:
On the face of it, think you could try an index n match,
like this, array-entered*, then copied down:
=INDEX(F$2:F$5050,MATCH(MAX(IF(A$2:A$5050=A3,C$2:C $5050)),IF(A$2:A$5050=A3,*C$2:C$5050),0))


*press CTRL+SHIFT+ENTER to confirm the formula


And if you need to include an additional criteria based on what's in col D,
eg: Actual, then try something like this, array-entered:
=INDEX(F$2:F$5050,MATCH(MAX(IF((A$2:A$5050=A3)*(D$ 2:D$5050="Actual"),C$2:C$*5050)),IF((A$2:A$5050=A3 )*(D$2:D$5050="Actual"),C$2:C$5050),0))


Likewise for "Estimated"


Aha, following the formula auditor at last I see what I was doing wrong.

For "Actual":
=INDEX(C$2:C$5050,MATCH(MAX(IF((A$2:A$5050=A3)*(D$ 2:D$5050="Actual"),C$2:C$*5050)),IF((A$2:A$5050=A3 )*(D$2:D$5050="Actual"),C$2:C$5050),0))
* * * * ^ * ^

And, as you say, likewise for "Estimated"


Max and Smartin,
Thanks you both for all your help. I was able to get it working just
need to make sure the data is sorted in ascending order, but, smartin
I think your “=INDEX(C$2:C$5050,MATCH(MAX(IF((A$2:A$5050=A3)*(D $2:D
$5050="Actual"),C$2:C$5050)),IF((A$2:A$5050=A3)*(D $2:D$5050="Actual"),C
$2:C$5050),0))” will help with that it keeps returning #N/A.

When I have some more time I will look into some more, but, thanks you
again…


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Match

Welcome, Bob

.. just need to make sure the data is sorted in ascending order ..


The above shouldn't be necessary since the MATCH is set to look for an exact
match (by virtue of the zero)

And you could also improve the robustness of the matching for col D by using
TRIM, viz. change: (D$2:D$5050="Actual") to: (TRIM(D$2:D$5050)="Actual")
within the expression
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:17,400 Files:358 Subscribers:55
xdemechanik
---
"B~O~B" wrote
Max and Smartin,
Thanks you both for all your help. I was able to get it working just
need to make sure the data is sorted in ascending order, but, smartin
I think your “=INDEX(C$2:C$5050,MATCH(MAX(IF((A$2:A$5050=A3)*(D $2:D
$5050="Actual"),C$2:C$5050)),IF((A$2:A$5050=A3)*(D $2:D$5050="Actual"),C
$2:C$5050),0))” will help with that it keeps returning #N/A.

When I have some more time I will look into some more, but, thanks you
again…


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 915
Default Match

B~O~B wrote:
On Aug 19, 9:40 pm, smartin wrote:
For "Actual":
=INDEX(C$2:C$5050,MATCH(MAX(IF((A$2:A$5050=A3)*(D$ 2:D$5050="Actual"),C$2:C$*5050)),IF((A$2:A$5050=A3 )*(D$2:D$5050="Actual"),C$2:C$5050),0))
^ ^


Max and Smartin,
Thanks you both for all your help. I was able to get it working just
need to make sure the data is sorted in ascending order, but, smartin
I think your “=INDEX(C$2:C$5050,MATCH(MAX(IF((A$2:A$5050=A3)*(D $2:D
$5050="Actual"),C$2:C$5050)),IF((A$2:A$5050=A3)*(D $2:D$5050="Actual"),C
$2:C$5050),0))” will help with that it keeps returning #N/A.

When I have some more time I will look into some more, but, thanks you
again…


Glad to know you got things working.

FWIW, the last formula I posted does need to be entered as an array formula.
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(match) Wind Uplift Calculations (match four conditions) JMeier Excel Worksheet Functions 8 August 1st 08 01:45 AM
need to return next match of table, only finding first match...HEL nwtf_vol[_2_] Excel Worksheet Functions 0 January 23rd 08 01:42 AM
MATCH Multiple Criteria & Return Previous / Penultimate Match Sam via OfficeKB.com Excel Worksheet Functions 27 October 6th 07 01:39 AM
index match array function-returning only first match, need last. Julie Olsen Excel Worksheet Functions 3 December 29th 06 12:50 AM
Lookup? Match? pulling rows from one spreadsheet to match a text f cjax Excel Worksheet Functions 3 July 21st 06 02:51 PM


All times are GMT +1. The time now is 06:32 PM.

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"