Finding Largest Value based on Criteria

gldurand

Board Regular
Joined
Jun 8, 2006
Messages
178
Office Version
  1. 2016
Platform
  1. Windows
Hi Folks,

I have this formula that is returning #N/A. Can someone assist

=LARGE(IF('Source Data'!$BE$2:$BE$65000="VALUE A",
IF('Source Data'!$S$2:$S$65000="VALUE B",
ISNUMBER(MATCH('Source Data'!$H$1:$H$65000,{"VALUE C","VALUE D"},0)),
'Source Data'!$BK$2:$BK$65000)),1)

Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
By no means am I an expert, but...
...
=LARGE(IF('Source Data'!$BE$2:$BE$65000="VALUE A",
IF('Source Data'!$S$2:$S$65000="VALUE B",
...

I suspect these are the statements that are giving you the problem:
'Source Data'!$BE$2:$BE$65000="VALUE A"
'Source Data'!$S$2:$S$65000="VALUE B"

I don't think the "IF" a Range of cells is equal to a single value is ever going to produce TRUE. Maybe someone with more experience can chime in.
 
Upvote 0
=LARGE(IF('Source Data'!$BE$2:$BE$65000="VALUE A",IF('Source Data'!$S$2:$S$65000="VALUE B",ISNUMBER(MATCH('Source Data'!$H$1:$H$65000,{"VALUE C","VALUE D"},0)),'Source Data'!$BK$2:$BK$65000)),1)

you only get three results :false ,ture or the data in $BK$2:$BK$65000
 
Upvote 0
Yes, you can get TRUE, it's called an array formula and must be confirmed with CTRL-SHIFT-ENTER rather than just Enter. The Large function will ignore the FALSE results in the array.

Although in this case you can use MAX instead of LARGE(x,1)
 
Upvote 0
Hi HOTPEPPER

Can you please list the entire formula, i tried to make it work with MAX, but somehow I am still getting the #N/A.

I want to get the largest value in column BK based on 2 criteria in seperate columns (BE & S) and 2 values of column H

=LARGE(

IF('Source Data'!$BE$2:$BE$65000="VALUE A",
IF('Source Data'!$S$2:$S$65000="VALUE B",
ISNUMBER(MATCH('Source Data'!$H$1:$H$65000,{"VALUE C","VALUE D"},0)),
'Source Data'!$BK$2:$BK$65000)),1)

What would it be using MAX

Thanks for your assistance
 
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,766
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top