Dear all,
Having some difficulty with the max if formula.... example of my data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]401580[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]385780[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]103500[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]103500[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]95220[/TD]
[/TR]
</tbody>[/TABLE]
I would like to find the max value if column A is "A".
I have the following coding but it returns "#NAME?"
Sub max_if()
Dim columnA As Range
Dim columnB As Range
Set columnA = [E:E]
Set columnB = [F:F]
[E1] = Evaluate("=MAX(IF(columnA=A,columnB))")
End Sub
Any help would be greatly appreciated!
Having some difficulty with the max if formula.... example of my data.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]401580[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]385780[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]103500[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]103500[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]95220[/TD]
[/TR]
</tbody>[/TABLE]
I would like to find the max value if column A is "A".
I have the following coding but it returns "#NAME?"
Sub max_if()
Dim columnA As Range
Dim columnB As Range
Set columnA = [E:E]
Set columnB = [F:F]
[E1] = Evaluate("=MAX(IF(columnA=A,columnB))")
End Sub
Any help would be greatly appreciated!