#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Replacement


Hi, If the number in column 3 is 3 and the 1st digit of the number i
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
'Nex

--
T De Villier
-----------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...fo&userid=2647
View this thread: http://www.excelforum.com/showthread.php?threadid=56373

Reply
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
Value Replacement palups Excel Worksheet Functions 6 November 20th 09 02:38 AM
#N/A Replacement Susana C via OfficeKB.com Excel Discussion (Misc queries) 2 December 29th 06 05:06 PM
Replacement T De Villiers[_47_] Excel Programming 0 July 21st 06 03:53 PM
Replacement mowen Excel Discussion (Misc queries) 1 September 7th 05 09:01 PM
Replacement CD Greg Maloney Excel Programming 0 June 18th 04 11:29 AM


All times are GMT +1. The time now is 06:15 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"