I am trying to add an Array Formula in my macro but it isn’t working. Here's the formula:
{=MAX(IF(G2:G207="Y",I2:I207))}
I need the ranges for the G and I Column to be done with using the length of Column I minus the Heading so it Column I has 35 values, I need the ranges to be G2:G36 and I2:I36.
Range("I2").Select
Range(Selection, Range("I65536").End(xlUp)).Select
RowCounter = Selection.Count
Range("L7").Select
Selection.FormulaArray = "=MAX(IF(G2:" & Range("G" & RowCounter + 1).Address & "=Y,(I2:" & Range("I65536").End(xlUp).Address & "))"
Can anybody help?
{=MAX(IF(G2:G207="Y",I2:I207))}
I need the ranges for the G and I Column to be done with using the length of Column I minus the Heading so it Column I has 35 values, I need the ranges to be G2:G36 and I2:I36.
Range("I2").Select
Range(Selection, Range("I65536").End(xlUp)).Select
RowCounter = Selection.Count
Range("L7").Select
Selection.FormulaArray = "=MAX(IF(G2:" & Range("G" & RowCounter + 1).Address & "=Y,(I2:" & Range("I65536").End(xlUp).Address & "))"
Can anybody help?