brightyoyo
New Member
Hi the formula works great when I manually use it , but I would like to use it in a macro where it sorts column B as well.
This is part of the macro
Dim F As Range
'Add Formula
For Each F In Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
F.Offset(, 3).FormulaArray = _
"=INDEX(List, MATCH(SMALL(COUNTIF(List, ""<""&List), ROW(R)), COUNTIF(List, ""<""&List), 0))"
Next F
This is part of the macro
Dim F As Range
'Add Formula
For Each F In Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
F.Offset(, 3).FormulaArray = _
"=INDEX(List, MATCH(SMALL(COUNTIF(List, ""<""&List), ROW(R)), COUNTIF(List, ""<""&List), 0))"
Next F