I am using a MAXIFS function in a very large excel database to find the most recent date of many dates listed in each row as long as the date is earlier than a particular date in cell $C$5. The problem is, the dates I am comparing are in non-adjacent columns so my max_range and criteria_range1 are in multiple, non-adjacent columns. (I cannot just include all the "in-between" columns in the range definitions because they contain other types of data.) The output gives me a #VALUE! error. Then, I tried using the CHOOSE function to join all the columns in a range such as:
=MAXIFS(CHOOSE({1,2,3,4,5,6,7,8},E12,G12,I12,K12,M12,O12,Q12,S12),CHOOSE({1,2,3,4,5,6,7,8},E12,G12,I12,K12,M12,O12,Q12,S12),"<="&$C$5)
but I still get a #VALUE! error. I don't think I can define fixed range names because I need to do this for thousands of lines of data.
Any thoughts? Perhaps there is another way to do this? Much appreciated.
Bookmarks