LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
bramruis via OfficeKB.com
 
Posts: n/a
Default How to replace the last digit in a cell with a letter

My cells in a column are filled with amounts for
which I have to change the last digit into a letter.
E.g. if last digit is 1 and the amount is positive it should be changed into
an A if it's negative it should be changed in a J
If the last digit is 2 and the amount is positive it should be changed into a
B, if it's negative it should be changed into a K.
If the last digit is 3 and the amount is positive it should be changed into a
C, it it's negative it should be changed into a L.
And so on.

I tried to use this formula but I'm hitting the 7 nested functions ceiling
because I need to change the last digits 0-9 both positive and negative.
Example: =IF(J40,REPLACE(J4,LEN(J4),1,IF(RIGHT(J4,1)="1"," A",IF(RIGHT(J4,1)
="2","B",IF(RIGHT(J4,1)="3","C",IF(RIGHT(J4,1)="4" ,"E"))))))

Is there any other way you can think of?
Thanks.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200510/1
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copying cell names Al Excel Discussion (Misc queries) 12 August 11th 05 03:01 PM
Replace null string with blank cell gjcase Excel Discussion (Misc queries) 2 August 9th 05 02:13 PM
Replace part of link address in a cell with a value(date) from ano Hakan Excel Discussion (Misc queries) 0 July 20th 05 12:39 PM
Append Text to Cell Values Using Replace Ngan Excel Discussion (Misc queries) 4 June 4th 05 08:30 PM
How do I add row total when cell contains both number and letter . cbarcroft Excel Discussion (Misc queries) 4 April 18th 05 11:52 PM


All times are GMT +1. The time now is 01:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"