Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cells(i, 5) = "1" & Mid(Cells(i, 5), 2)
"T De Villiers" wrote: Hi, If the number in column 3 is 3 and the 1st digit of the number in column 5 is 2 I have to replace this with 1 the following is an excerpt of my code which isnt working, Many Thanks For i = 1 To lastrow If cells(i,3) = 3 and left(Cells(i, 5),1) = 1 Then Cells(i,5) = Replace(Cells(i,5), 1, 1, "1") 'End If 'Next -- T De Villiers ------------------------------------------------------------------------ T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479 View this thread: http://www.excelforum.com/showthread...hreadid=563734 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Value Replacement | Excel Worksheet Functions | |||
#N/A Replacement | Excel Discussion (Misc queries) | |||
Replacement | Excel Programming | |||
Replacement | Excel Programming | |||
Replacement CD | Excel Programming |