View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Q. Mike Q. is offline
external usenet poster
 
Posts: 49
Default change 0.87DR to -.087 and 0.55CR to 0.55

=IF(RIGHT(a1,2)=dr,a1*-1,a1)

TRY
=IF(RIGHT(A1,2)="DR",MID(A1,1,(LEN(A1)-2))*-1,MID(A1,1,LEN(A1)-2)*1)
--
Mike Q.


"BillyRogers" wrote:

I need to drof the DR and CR which is not problem, but I also need to change
the number that end in DR to a negative number.

I've tried using the if function and the right function to check for the
letters DR
like this but it doesn't work.

=IF(RIGHT(a1,2)=dr,a1*-1,a1)

I need to check for text characters DR and i can't figure out how to do it
with the if function. I may need to use a macro, I'm not sure.
--
Billy Rogers

Dallas,TX

Currently Using SQL Server 2000, Office 2000 and Office 2003