LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default find and replace macro problem

Hi everyboby
I'm new to macro programing and am trying to write a simple, or so I
thought, replace macro in excel 2007.

I have two sheets on the same workbook one called "colour full" and
one called "colour"
Sheet "colour" contains a table with colour code and the coresponding
description. Sheet "colour full" contains a column of colour code
which i would like to replace with the description.

my problem seems to be in how to input the active cell value in to the
"Replace What:=" function and the active cell offset value in to the
"Replacement:=" function.

any help would be much apreciated as i have a lot of these replace
tasks to do



Sub colour()
'
' colour Macro
'
' Keyboard Shortcut: Ctrl+l
'
ActiveCell.Select
Sheets("colour full").Select
ActiveCell.Columns("A:A").EntireColumn.Select
Selection.Replace What:=cell.Value,
Replacement:=cell.offset(0,-3)."Value", LookAt
:=xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False
Sheets("colour").Select
ActiveCell.Offset(1, 0).Range("A1").Select
End Sub

Thanks
Simon

 
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/Replace Problem Ed B.[_2_] Excel Discussion (Misc queries) 0 August 16th 08 04:33 PM
Using Find and Replace to replace " in a macro snail30152 Excel Programming 1 April 13th 06 11:58 PM
Find-Replace problem nastech Excel Discussion (Misc queries) 1 February 12th 06 05:18 AM
Find replace problem [email protected] Excel Discussion (Misc queries) 2 December 8th 05 10:30 PM
Problem with Find and Replace mjhill01 Excel Worksheet Functions 1 August 18th 05 04:12 AM


All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"