Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Simon
 
Posts: n/a
Default is it possible to Restrict Find & Replace to 1 column

I need to Find and Replace values in a Column

Same data also exists in other columns - so I would like to restrict the
Find and Replace to
a specified column

I need to do this in a Macro ie. popup a text box


  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Just select the column before doing the F&R.

In article ,
"Simon" wrote:

I need to Find and Replace values in a Column

Same data also exists in other columns - so I would like to restrict the
Find and Replace to
a specified column

I need to do this in a Macro ie. popup a text box

  #3   Report Post  
Simon
 
Posts: n/a
Default

No, that dosen't work

Also replaces values that exist in other columns !

This is the Macro I recorder

Sub Macro2()
Columns("W:W").Select
Selection.Replace What:="740", Replacement:="989", LookAt:=xlWhole, _
SearchOrder:=xlByColumns, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub

Other columns with 740 in it are also replaced with 989

"JE McGimpsey" wrote in message
...
Just select the column before doing the F&R.

In article ,
"Simon" wrote:

I need to Find and Replace values in a Column

Same data also exists in other columns - so I would like to restrict the
Find and Replace to
a specified column

I need to do this in a Macro ie. popup a text box



  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Does for me. XL04, XL03.

Your macro works fine as well. Only replaces 740 in column W.


What happens when you don't select:

Sub Macro3()
Columns("W:W").Replace _
What:=740, _
Replacement:=989, _
LookAt:=xlWhole
End Sub

In article ,
"Simon" wrote:

No, that dosen't work

  #5   Report Post  
Simon
 
Posts: n/a
Default

I'm using Office XP Pro - XL2002 SP2

I'll see if we have a machine 2003 on it!

"JE McGimpsey" wrote in message
...
Does for me. XL04, XL03.

Your macro works fine as well. Only replaces 740 in column W.


What happens when you don't select:

Sub Macro3()
Columns("W:W").Replace _
What:=740, _
Replacement:=989, _
LookAt:=xlWhole
End Sub

In article ,
"Simon" wrote:

No, that dosen't work





  #6   Report Post  
Simon
 
Posts: n/a
Default

Thanks

Works ok with 2002 SP3


"JE McGimpsey" wrote in message
...
Does for me. XL04, XL03.

Your macro works fine as well. Only replaces 740 in column W.


What happens when you don't select:

Sub Macro3()
Columns("W:W").Replace _
What:=740, _
Replacement:=989, _
LookAt:=xlWhole
End Sub

In article ,
"Simon" wrote:

No, that dosen't work



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
Find and REPLACE within a selection, or column- not entire sheet/. smithers2002 Excel Worksheet Functions 4 April 21st 05 04:45 PM
find and replace TCampb2 Excel Discussion (Misc queries) 2 April 19th 05 12:04 AM
Find and Replace - Quickest Option? Lindsey M Excel Worksheet Functions 1 March 8th 05 11:34 AM
find replace cursor default to find box luffa Excel Discussion (Misc queries) 0 February 3rd 05 12:11 AM
VB Find and Replace Bony_Pony Excel Worksheet Functions 10 December 6th 04 05:45 PM


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