I'm working from a download excel file that I copy and paste to an existing
work book. I have a sumif formula that i'm using to pull information from
the download but am running into a problem with the "cr" (for credit) in my
download. I need for it to show "-" or "( )" . Is their a formula I can
include in my existing workbook to make this conversion, or maybe a macro(
which i've never worked with).
a b
1 1cr 2cr
needs to be:
a b
1 -1 or (2)
I hope I have supplied enough information.
Thank you.
Don Guillett - 15 Jun 2006 18:54 GMT
this will do it but it will also do it if you just have cr without the
number
Sub fixcr()
For Each c In range("a2:a200")
If Len(c) > 2 And LCase(Right(c, 2)) = "cr" Then _
c.Value = "-" & Left(c, Len(c) - 2)
Next c
End Sub

Signature
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
>
> I'm working from a download excel file that I copy and paste to an
[quoted text clipped - 18 lines]
>
> Thank you.