View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default convert numbers with K and M

On Tue, 8 May 2007 21:33:40 -0600, "Fred Smith" wrote:

Try the following:

=left(a1,len(a1)-1)*if(right(a1,1)="K",1000,if(right(a1,1)="M",1000 000,1))


This formula assumes that every number has either a K or M suffix. If there
are values that might be entered with no suffix, then:

=IF(ISNUMBER(-A1),--A1,LEFT(A1,LEN(A1)-1)*
IF(RIGHT(A1,1)="K",1000,IF(RIGHT(A1,1)="M",1000000 ,1)))

--ron