This code will change all of your numbers into proper numbers.
Eg. 24.56- will be changed to -24.56
Select the cells that you would liek to change and run this code.
If there is a "+" on the right side then the number will be positive.
If there is a "-" on the right side then the number will be negative.
If there is neither on the right side then the number will not be
touched.
After this your =sum(E:E) will work excellently.
Sub changeToNumbers()
Dim r As Range, sign As String
For Each r In Selection
If Not r.Value = "" Then
sign = Right(r.Value, 1)
If sign = "+" Then
r.Formula = "=" & Left(r.Value, Len(r.Value) - 1)
ElseIf sign = "-" Then
r.Formula = "=-" & Left(r.Value, Len(r.Value) - 1)
End If
End If
Set r = r.Offset(1, 0)
Next
End Sub
Cheers,
Jason Lepack
PS. you cheeky bugger. ;)
> Is your data in columns three formatted as numbers? If not that is
> probably your problem.
[quoted text clipped - 113 lines]
> > Kevin J Prince
> > http://www.1and1.co.uk/?k_id=5257507
Kevin J Prince - 07 Dec 2006 08:28 GMT
Jason,
excellent, that's done the job very well thank you very much for you
help.
THANK YOU
All the best for the season to you an your family.
Regards Kevin
>This code will change all of your numbers into proper numbers.
>
[quoted text clipped - 150 lines]
>> > Kevin J Prince
>> > http://www.1and1.co.uk/?k_id=5257507

Signature
"I live in my own little world.
But it's OK. They know me here."
= = = =
Kevin J Prince
http://www.1and1.co.uk/?k_id=5257507