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
2
Medium Priority
?
322 Views
Last Modified: 2012-08-13


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
Comment
Question by:kieranjcollins
2 Comments
 
LVL 43

Accepted Solution

by:
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

by:kieranjcollins
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)))

=D$1 instead of >=D$1

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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question