Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I calculate the max from two arrays with a year value?

Posted on 2012-04-10
4
Medium Priority
?
293 Views
Last Modified: 2012-04-16
Hello

I have asked a similar question before and need some additional help:

As you can see, there are dates in column A and this time, I'd like to display the favourite shop for, lets say, 2011. What do I need to change to the original formula of

=INDEX(Shop,MODE(IF(Customer=F2,IF(Shop<>"",MATCH(Shop,Shop,0)*{1,1}))))

Open in new window


Thanks
Massimo

screenshotmode-by-year.xlsx
mode-by-year.PNG
0
Comment
Question by:Massimo Scola
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37827235
If you enter the year number in I1 then you can try this formula

=IFERROR(INDEX(Shop,MODE(IF((Customer=F2)*(YEAR(DateVisited)=$I$1),IF(Shop<>"",MATCH(Shop,Shop,0)*{1,1})))),"")

Open in new window

0
 

Author Comment

by:Massimo Scola
ID: 37827558
Hi

I've entered the formula but I get empty cells .. I've attached the spreadsheet.
Did I miss something?

Massimo
mode-by-year-problem.xlsx
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 2000 total points
ID: 37829102
Maybe you are not entering this as an array formula. When you enter the formula in the cell press F2 then press shift-ctrl-enter
See attached
Copy-of-mode-by-year-problem.xlsx
0
 

Author Closing Comment

by:Massimo Scola
ID: 37851222
Hello and sorry for my late reply<br />Thanks a lot, it works now.<br /><br />Massimo
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

660 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