Replacing cell values

abhi - May 26, 2012 at 02:10 PM
 abhi - May 27, 2012 at 07:05 AM

My requirement is to replace the cell values only for a given range. And my range is only the cell values in a given single column.
Below is the code I am using.

Range("A3", Range("A3").End(xlDown)).Select
Cells.Replace What:="smalldatetime", Replacement:="date", LookAt:=xlPart, _

But the issue I am facing is that the cell values are getting replaced in the columns B and C as well for the matching word, though columns B and C are not in the range specified.

Can anyone please guide me where I am going wrong.

Thanks in advance for help.

1 reply

rizvisa1 Posts 4479 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 768
May 26, 2012 at 05:38 PM
This part is what you are doing wrong
you need "selection."
Thanks a lot for inputs. It's working now the way I want :)