Hi all, I would ask you, how I make macro with max/min/mode and condition.
If I write directly to the cells function: =max(if(data=A,source)) and push ctrl+shift+enter excel convert me this function to the {=MAX(IF(C2:C227=AN2,H2:H227))} and its work correct. But I can't record this function and if I fill directly to the cell application.worksheetfunction its not working.

I tried to this one:
Range("ao2") = _
"{=MAX(IF(RC[-38]:R[225]C[-38]=RC[-1],RC[-33]:R[225]C[-33]))}"
and in cells I get only text: {=MAX(IF(RC[-38]:R[225]C[-38]=RC[-1],RC[-33]:R[225]C[-33]))}


Could you please help me ?