Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hiya! i was wondering if there was a way to replace just the last three
characters in a cell? example i have 123456000 i would like to have instead of the 000 a 959 so it would be 123456959? any ideas? -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200802/1 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try the replace function. Use use the formula helper box for the context.
=Replace() "Phillips via OfficeKB.com" wrote: Hiya! i was wondering if there was a way to replace just the last three characters in a cell? example i have 123456000 i would like to have instead of the 000 a 959 so it would be 123456959? any ideas? -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200802/1 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Tue, 12 Feb 2008 16:24:05 GMT, "Phillips via OfficeKB.com" <u27679@uwe
wrote: Hiya! i was wondering if there was a way to replace just the last three characters in a cell? example i have 123456000 i would like to have instead of the 000 a 959 so it would be 123456959? any ideas? =REPLACE(A1,LEN(A1)-2,3,959) This returns a text string, so you may want to precede it with a double unary to convert it back to a number: =--REPLACE(A1,LEN(A1)-2,3,959) If the values are always numbers, you could use this: =INT(A1/1000)*1000+959 --ron |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks!!!
Ron Rosenfeld wrote: Hiya! i was wondering if there was a way to replace just the last three characters in a cell? example i have 123456000 i would like to have instead of the 000 a 959 so it would be 123456959? any ideas? =REPLACE(A1,LEN(A1)-2,3,959) This returns a text string, so you may want to precede it with a double unary to convert it back to a number: =--REPLACE(A1,LEN(A1)-2,3,959) If the values are always numbers, you could use this: =INT(A1/1000)*1000+959 --ron -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200802/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use of Wildcard characters with replace | Excel Discussion (Misc queries) | |||
replace unicode characters | Excel Programming | |||
Replace non printable characters | Excel Worksheet Functions | |||
Replace pattern of characters | Excel Discussion (Misc queries) | |||
Replace characters with symbols | Excel Programming |