max if formula

Corleone

Well-known Member
Joined
Feb 2, 2003
Messages
841
Office Version
  1. 365
trying to get a formula to provide the latest date in column f based on the criteria in column b
however, im just getting "#value"

anyone know what im missing below

=MAX((DETAIL_ACTIVITIES!B1:B3000="IG1--Cantilever Base OLE")*(DETAIL_ACTIVITIES!F2:F3000))

thanks
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
trying to get a formula to provide the latest date in column f based on the criteria in column b
however, im just getting "#value"

anyone know what im missing below

=MAX((DETAIL_ACTIVITIES!B1:B3000="IG1--Cantilever Base OLE")*(DETAIL_ACTIVITIES!F2:F3000))

thanks
Your ranges aren't the same size:

DETAIL_ACTIVITIES!B1:B3000
DETAIL_ACTIVITIES!F2:F3000

Array entered**:

=MAX(IF(DETAIL_ACTIVITIES!B2:B3000="IG1--Cantilever Base OLE",DETAIL_ACTIVITIES!F2:F3000))

** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.
 
Upvote 0
Your ranges aren't the same size:

DETAIL_ACTIVITIES!B1:B3000
DETAIL_ACTIVITIES!F2:F3000

Array entered**:

=MAX(IF(DETAIL_ACTIVITIES!B2:B3000="IG1--Cantilever Base OLE",DETAIL_ACTIVITIES!F2:F3000))

** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.

Thanks for this IT WORKS PERFECTLY
 
Upvote 0
just tried adding in an extra condition and changing the if statement to an IF AND so that it picks the latest date based on both criteria in column B and C being met but it just returns 01/01/1900 am i missing something here

thanks

=MAX(IF(AND(DETAIL_ACTIVITIES!B2:B3000="IG01--Cantilever Base OLE",DETAIL_ACTIVITIES!C2:C3000="TIF 2 Bescosth"),DETAIL_ACTIVITIES!F2:F3000))
 
Upvote 0
Try

=MAX(IF((DETAIL_ACTIVITIES!B2:B3000="IG01--Cantilever Base OLE")*(DETAIL_ACTIVITIES!C2:C3000="TIF 2 Bescosth"),DETAIL_ACTIVITIES!F2:F3000))

instead, remember to confirm with Shirt Ctrl Enter.
 
Upvote 0
just tried adding in an extra condition and changing the if statement to an IF AND so that it picks the latest date based on both criteria in column B and C being met but it just returns 01/01/1900 am i missing something here

thanks

=MAX(IF(AND(DETAIL_ACTIVITIES!B2:B3000="IG01--Cantilever Base OLE",DETAIL_ACTIVITIES!C2:C3000="TIF 2 Bescosth"),DETAIL_ACTIVITIES!F2:F3000))
How about using cells to hold the criteria:
  • A1 = IG01--Cantilever Base OLE
  • A2 = TIF 2 Bescosth
Still array entered**:

=MAX(IF(DETAIL_ACTIVITIES!B2:B3000=A1,IF(DETAIL_ACTIVITIES!C2:C3000=A2,DETAIL_ACTIVITIES!F2:F3000)))

** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.
 
Upvote 0
How about using cells to hold the criteria:
  • A1 = IG01--Cantilever Base OLE
  • A2 = TIF 2 Bescosth
Still array entered**:

=MAX(IF(DETAIL_ACTIVITIES!B2:B3000=A1,IF(DETAIL_ACTIVITIES!C2:C3000=A2,DETAIL_ACTIVITIES!F2:F3000)))

** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.

This is the approach i will adopt as the user has a categoty tab where he/she will input the
work types ie "IG01--Cantilever Base OLE" and Area "TIF 2 Bescosth" on that page so i can then do just as you suggest above
Cheers
 
Upvote 0
This is the approach i will adopt as the user has a categoty tab where he/she will input the
work types ie "IG01--Cantilever Base OLE" and Area "TIF 2 Bescosth" on that page so i can then do just as you suggest above
Cheers
Thanks for the feedback! :cool:
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,147
Members
452,891
Latest member
JUSTOUTOFMYREACH

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