View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
dennis dennis is offline
external usenet poster
 
Posts: 202
Default Edit Replace the third digit only of a number

Create this formula in a new column and then drag down. Copy and paste
special values only over your existing column when you are happy with the
results.
In this example my list of numbers are in column A and I am creating my new
column in B - replacing the rightmost 8 with a 9

=IF(RIGHT(TEXT(A1,"General"),1)="8",VALUE(LEFT(TEX T(A1,"General"),LEN(TEXT(A1,"General"))-1)&"9"),A1)

"Hammertime" wrote:

If I have long list of three digit numbers in an Excel column that have the
number 8 in them how can I replace the 8 in the last digit (eg 458) without
changing the second digit when there is an 8 within it (eg 488). I've tried
"text to columns" & then concatenating but this disrupts the formular.
Thanks for any help you can provide.