Hi All,
I need to code a lookup in VBA to find a cell in a worksheet containing the max value, subject to a criteria in another column.
Example (two columns of date in a worksheet):
Apples 10
Apples 20
Bananas 30
I need to return '20' being the largest value for apples.
Trivial using worksheet formulae, but I can't think how to do it in VBA!
Thanks,
Alan.
Range("D1").FormulaArray = "=MAX(IF(A1:A3=""apples"",