Max If

jr1234

New Member
Joined
Apr 22, 2015
Messages
4
Hello,

I am trying to determine that latest Dates that occur next to a specific Name.

Here is the formula that I am using:

{=MAX(IF(POs!AB:AB=A2,POs!AC:AC))}

whereas:
POs!AB:AB is a spreadsheet range of Names
A2 is one specific Name that I want to find the latest corresponding Date
POs!AC:AC is a spreadsheet of Dates which corresponds with the Names

I cannot figure out what I am doing wrong. Any feedback?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi.

For a start, I strongly recommend that you don't use entire column references within an array formula. That formula is being forced to calculate over more than two million cells, an astonishing amount for a single formula.

Unlike e.g. COUNTIF(S)/SUMIF(S), array formulas calculate over all cells passed to them, whether technically beyond the last-used cells in those ranges or not.

Try choosing a suitably large (but not too large) upper range reference.

Regards
 
Upvote 0
Thanks for the tip. I am now trying the following formula.

{=MAX(IF(POs!$AB$1:$AB$15000=A2,POs!$AC$1:$AC$15000))}

Unfortunately I am still getting the #VALUE! error. The PO spreadsheet has a lot of rows so I cannot narrow down the range much further.
 
Upvote 0
It should work? Are the dates real dates? Do the names match?
Code:
[TABLE="width: 325"]
<!--StartFragment--> <colgroup><col width="65" span="5" style="width:65pt"> </colgroup><tbody>[TR]
  [TD="width: 65"]g[/TD]
  [TD="class: xl63, width: 65, align: right"]01/01/15[/TD]
  [TD="class: xl63, width: 65"][/TD]
  [TD="width: 65"]f[/TD]
  [TD="class: xl63, width: 65, align: right"]12/01/15[/TD]
 [/TR]
 [TR]
  [TD]g[/TD]
  [TD="class: xl63, align: right"]02/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD]a[/TD]
  [TD="class: xl63, align: right"]10/01/15[/TD]
 [/TR]
 [TR]
  [TD]g[/TD]
  [TD="class: xl63, align: right"]03/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD]g[/TD]
  [TD="class: xl63, align: right"]15/01/15[/TD]
 [/TR]
 [TR]
  [TD]g[/TD]
  [TD="class: xl63, align: right"]04/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]g[/TD]
  [TD="class: xl63, align: right"]05/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]a[/TD]
  [TD="class: xl63, align: right"]06/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]a[/TD]
  [TD="class: xl63, align: right"]07/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]a[/TD]
  [TD="class: xl63, align: right"]08/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]f[/TD]
  [TD="class: xl63, align: right"]09/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]a[/TD]
  [TD="class: xl63, align: right"]10/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]d[/TD]
  [TD="class: xl63, align: right"]11/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]f[/TD]
  [TD="class: xl63, align: right"]12/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]g[/TD]
  [TD="class: xl63, align: right"]13/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]h[/TD]
  [TD="class: xl63, align: right"]14/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]g[/TD]
  [TD="class: xl63, align: right"]15/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
 [TR]
  [TD]d[/TD]
  [TD="class: xl63, align: right"]16/01/15[/TD]
  [TD="class: xl63"][/TD]
  [TD][/TD]
  [TD][/TD]
 [/TR]
<!--EndFragment--></tbody>[/TABLE]
 
Upvote 0
And are there any #VALUE! errors in either of those two ranges anywhere?

Regards
 
Upvote 0
The names do match, I made sure by using the If function to make sure two did and the result came back true. What do you mean by 'are the dates real dates?'
 
Upvote 0
I realized that I did have some #VALUE!s in my Name column - I did not realize that this would throw the whole formula off. It seems to be working now - thanks for the help!
 
Upvote 0

Forum statistics

Threads
1,221,444
Messages
6,159,914
Members
451,603
Latest member
SWahl

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