Hi all. .A......... B 10.....123 ab 20.....123ab 30.....ab 123 40.....ab123 50.....123 60.....ab I need to sum values from column 'A' if same row in 'B' there's some digit. So, in e.g. above the result would be 10+20+30+40+50=150 Thanks in advance.
Regards Osvaldo
UDF [vba]Function NumStr#(rSum As Range, rCheck As Range) Dim i&, smm# If rSum.Count <> rCheck.Count Then Exit Function For i = 1 To rSum.Count If rCheck(i, 1) Like "*[0-9]*" Then smm = smm + rSum(i, 1) Next i NumStr = smm End Function[/vba]
Hi nilem. Works nicely. Thanks for your attention and for your time.
Forum Rules