Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
Solved

# Array formula - max date from a range for a specific value

Posted on 2011-05-11
Medium Priority
322 Views

I have attached part of a file I am working on

I have a list of dates and sales assistants on 1 sheet

What I am looking to do is write a formula so that my array formula:
=IF(MAX(IF((Data!B:B<=B6)*(Data!B:B>=A6),Data!B:B,0))=0,"",MAX(IF((Data!B:B<=B6)*(Data!B:B>=A6),Data!B:B,0)))
will also look at data values on another column as a condition for doing the max range formula

e,g, I would like Cell C3 to show max date range values for Sales Assist 1 etc

Any help greatly appreciated
Kieran

Array-formula-help.xlsx
0
Question by:kieranjcollins

LVL 43

Accepted Solution

Saqib Husain, Syed earned 2000 total points
ID: 35743142
Try this formula

=IF(MAX(IF((Data!\$B\$1:\$B\$1111<=\$B3)*(Data!\$B\$1:\$B\$1111>=\$A3)*(Data!\$A\$1:\$A\$1111>=C\$1),Data!\$B\$1:\$B\$1111,0))=0,"",MAX(IF((Data!\$B\$1:\$B\$1111<=\$B3)*(Data!\$B\$1:\$B\$1111>=\$A3)*(Data!\$A\$1:\$A\$1111>=C\$1),Data!\$B\$1:\$B\$1111,0)))
0

Author Comment

ID: 35743172
I made a small tweak to your formula to get it working

=IF(MAX(IF((Data!\$B\$1:\$B\$1111<=\$B3)*(Data!\$B\$1:\$B\$1111>=\$A3)*(Data!\$A\$1:\$A\$1111=D\$1),Data!\$B\$1:\$B\$1111,0))=0,"",MAX(IF((Data!\$B\$1:\$B\$1111<=\$B3)*(Data!\$B\$1:\$B\$1111>=\$A3)*(Data!\$A\$1:\$A\$1111=D\$1),Data!\$B\$1:\$B\$1111,0)))

But other than that, your help was awesome, 500 points to you
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
###### Suggested Courses
Course of the Month11 days, 20 hours left to enroll