E
etradeguru
I extract a list into a .txt file and then open in excel.The list
contents are from a dynamic source, but contain certain text items
that are constant. I want to be able to prompt for the word and then
find the next instance of that word in Row D, then navigate three
cells left and one cell down and then paste a formula. I need to loop
through this until the end of instances of the given word in column D.
Currently I have got as far as follows: -
Range("A1").Select
Cells.Find(What:="directory", After:=ActiveCell,
LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False).Activate
ActiveCell.Offset(1, -3).Range("A1").Select
ActiveCell.FormulaR1C1 = _
"=CONCATENATE(R[-1]C[3],"" "",R[-1]C[4],"" "",R[-1]C[5],""
"",R[-1]C[6],"" "",R[-1]C[7],"" "",R[-1]C[8],"" "",R[-1]C[9])"
ActiveCell.Select
Selection.Copy
Cells.FindNext(After:=ActiveCell).Activate
ActiveCell.Offset(1, -3).Range("A1").Select
ActiveSheet.Paste
Now I need to loop through the rest of the document.
Help gratefully appreciated.
Mark
contents are from a dynamic source, but contain certain text items
that are constant. I want to be able to prompt for the word and then
find the next instance of that word in Row D, then navigate three
cells left and one cell down and then paste a formula. I need to loop
through this until the end of instances of the given word in column D.
Currently I have got as far as follows: -
Range("A1").Select
Cells.Find(What:="directory", After:=ActiveCell,
LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False).Activate
ActiveCell.Offset(1, -3).Range("A1").Select
ActiveCell.FormulaR1C1 = _
"=CONCATENATE(R[-1]C[3],"" "",R[-1]C[4],"" "",R[-1]C[5],""
"",R[-1]C[6],"" "",R[-1]C[7],"" "",R[-1]C[8],"" "",R[-1]C[9])"
ActiveCell.Select
Selection.Copy
Cells.FindNext(After:=ActiveCell).Activate
ActiveCell.Offset(1, -3).Range("A1").Select
ActiveSheet.Paste
Now I need to loop through the rest of the document.
Help gratefully appreciated.
Mark