hi
i have this formula below
i would like to add one more thing to this, that if its a duplicate it should only show me the fmin of the lowest of the two or three duplicates
the fmin is a custom function the code is below
example attached
Thanks
i have this formula below
Excel Formula:
=IF(A2="","",IF((COUNTIFS($A2:A$686,A2)=2)+0=0,FMin(E2:K2),""))
i would like to add one more thing to this, that if its a duplicate it should only show me the fmin of the lowest of the two or three duplicates
the fmin is a custom function the code is below
VBA Code:
Function fMin(r As Range)
Dim cel As Range
For Each cel In r
If InStr(cel.NumberFormat, "$") > 0 Then
If IsEmpty(fMin) And cel.Value > 0 Then fMin = cel.Value
If cel.Value < fMin And cel.Value > 0 Then fMin = cel.Value
End If
Next cel
End Function
example attached
Book2 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | Item # | Description | Price | qty | Price | qty | Price | qty | Price | results | ||
2 | 00001 | orange | $42.00 | 10 | $38.20 | 20 | $37.20 | 30 | $33.00 | |||
3 | 00002 | apple | $42.00 | 10 | $38.20 | 20 | $37.20 | 30 | $33.00 | |||
4 | 00003 | banana | $42.00 | 10 | $38.20 | 20 | $37.20 | 30 | $33.00 | |||
5 | ||||||||||||
6 | 00001 | orange | $42.00 | 10 | $38.20 | 20 | $37.20 | 30 | $32.00 | $32.00 | ||
7 | 00002 | apple | $42.00 | 10 | $38.20 | 20 | $37.20 | 30 | $32.00 | $32.00 | ||
8 | 00003 | banana | $42.00 | 10 | $38.20 | 20 | $37.20 | 30 | $32.00 | $32.00 | ||
9 | ||||||||||||
10 | 00001 | orange | $42.00 | 10 | $38.20 | 20 | $37.20 | 30 | $43.00 | |||
11 | 00002 | apple | $42.00 | 10 | $38.20 | 20 | $37.20 | 30 | $43.00 | |||
12 | 00003 | banana | $42.00 | 10 | $38.20 | 20 | $37.20 | 30 | $43.00 | |||
Sheet1 |
Thanks
Last edited: