Good Day to all
I am trying to replace below formulas with a macro code.
=Min(if($C$7:$C$14940=$N7;if($D$7:$D$14940=M$7;$F$7:$F$11940)))
=Max(if($C$7:$C$14940=$N7;if($D$7:$D$14940=$M7;$F$7:$F$14940)))
I have 2 criterias
Criteria 1 : Plate Number like (PN AU 2095)
Criteria 2 : Period like (2018/01)
I try to find max or min values from Column (F7:to last Row) with multiple criteria.
Column (D7:to last row)= Plate Numbers
Column (C7:to last row)= Periods
Column (F7:to last row)= Kilometers (where the code must get the max or min "Km" regarding to these 2 criteria.)
Thanks for any help from now.
I am not allowed to load file to forum yet.
That is why I had load my file to link below.
Excel file link : [FONT=source_sans_proregular]https://mega.nz/#!BssiGRaa[/FONT][FONT=source_sans_proregular]!iNznlQslb_7u0WK0bAm20dHMnNmx9503AcP56YIV5YA[/FONT]
Note : By "recording macro" I can get this code. But I am not looking for something like this.
Range("Q9").Select
Selection.FormulaArray = _
"=MIN(IF(R7C3:R14940C3=R[-1]C14,IF(R7C4:R14940C4=R3C[-4],R7C6:R11940C6)))"
I am trying to replace below formulas with a macro code.
=Min(if($C$7:$C$14940=$N7;if($D$7:$D$14940=M$7;$F$7:$F$11940)))
=Max(if($C$7:$C$14940=$N7;if($D$7:$D$14940=$M7;$F$7:$F$14940)))
I have 2 criterias
Criteria 1 : Plate Number like (PN AU 2095)
Criteria 2 : Period like (2018/01)
I try to find max or min values from Column (F7:to last Row) with multiple criteria.
Column (D7:to last row)= Plate Numbers
Column (C7:to last row)= Periods
Column (F7:to last row)= Kilometers (where the code must get the max or min "Km" regarding to these 2 criteria.)
Thanks for any help from now.
I am not allowed to load file to forum yet.
That is why I had load my file to link below.
Excel file link : [FONT=source_sans_proregular]https://mega.nz/#!BssiGRaa[/FONT][FONT=source_sans_proregular]!iNznlQslb_7u0WK0bAm20dHMnNmx9503AcP56YIV5YA[/FONT]
Note : By "recording macro" I can get this code. But I am not looking for something like this.
Range("Q9").Select
Selection.FormulaArray = _
"=MIN(IF(R7C3:R14940C3=R[-1]C14,IF(R7C4:R14940C4=R3C[-4],R7C6:R11940C6)))"