Function Currency_Total(rng As Range, cur As String)
Dim cell As Range
Dim ans As Double
For Each cell In rng
Select Case cur
Case "£"
If InStr(cell.NumberFormatLocal, cur) > 0 Then ans = ans + cell.Value
Case Else
If InStr(cell.NumberFormatLocal, "$" & cur) > 0 Then ans = ans + cell.Value
End Select
Next cell
Currency_Total = ans
End Function
Function Currency_Total(rng As Range, cur As String)
Dim cell As Range
Dim ans As Currency
If cur <> "£" Then cur = "$" & cur
For Each cell In rng
If InStr(cell.NumberFormatLocal, cur) > 0 Then ans = ans + cell.Value
Next cell
Currency_Total = ans
End Function