Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find/Replace Problem | Excel Discussion (Misc queries) | |||
Using Find and Replace to replace " in a macro | Excel Programming | |||
Find-Replace problem | Excel Discussion (Misc queries) | |||
Find replace problem | Excel Discussion (Misc queries) | |||
Problem with Find and Replace | Excel Worksheet Functions |