I have a Summary tab in an Excel file that needs to look at an Accruals tab to find a Max and Min. The problem I am having is that there are many different Location/Commodity combinations and I need to find the Max and Min based on the Location/Commodity combination. Location and Commodity are in two separate columns.
For example, location 123 can have a commodity of 01, 02, and 03. Location 123 Commodity 01 can have several different prices. I need to look up location 123, commodity 01 and find the max of those prices.
I have been asked not to use an array as it slows the files down. I was previously attempting to use =MAX(IF()) but that was not preferred.
How can I find values on the Accruals tab based on the location column AND the commodity column matching from the Summary tab and then get the max of those values based on the loc/comm combination? Is there a more simple way through VBA? I was trying to write a loop but I am not very advanced and having some difficulty.
maxandminto the resulting groups) than for VBA