Forum Discussion

Lars Söderqvist's avatar
Lars Söderqvist
Copper Contributor
Apr 13, 2018

Macro

Hello out there, can someone help me please.

 

I have som problems with a excelfile where i work in one sheet  and read to another sheet.

I write i one cell for example "Sa" and the other sheet reads it to onother cell with the commando =.

 

After that i want to write a marko string so "Sa" after you run the macro will be "SAND" instead.

It´s the column D i want to run the macro.

 

Another example in the cell could be "gr Sa  _si_". And i want the makro to write out "gravely SAND with layer of sand".

 

Thanks for any help, i have tried byt i´m stuckted.

 

 

 

2 Replies

  •  

     

    Sub Macro1()
    Columns("D:D").Select
    Selection.Replace What:="Sa", Replacement:="SAND", LookAt:=xlWhole
    Selection.Replace What:="gr Sa _si_", Replacement:="gravely SAND with layer of sand", LookAt:=xlWhole

    End Sub

     

Resources