View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Replacing part of a cell text

try this

Sub test2()
Worksheets("sheet3").Range("c2").Value = _
Replace(Worksheets("sheet3").Range("c2"), "11", _
Worksheets("sheet1").Range("c2").Value)
End Sub


--


Gary


"oOpsy" wrote in
message ...

Hi Gary!

Thanks for the code. But sorry that i left out something impt! In
sheet3, C2, i have data such as <val11</val. I want to replace just
the numeral 11 from the numeral 20 which i copy from Sheet 1 C2. Is
that possible? So that in the end, sheet3 C2 will display as
<val20</val

Thanks!


--
oOpsy
------------------------------------------------------------------------
oOpsy's Profile:
http://www.excelforum.com/member.php...o&userid=29132
View this thread: http://www.excelforum.com/showthread...hreadid=489705