Hi everyone. Thanks for all the generous help in the past few weeks. Once I know what the heck I am doing, i hope to assist as well.
I want to:
1) Look through a range of cells on a worksheet
2) If I locate a particular string (which is actually a link to an external workbook), I want to replace it with a formula.
3) A typical link looks like this: ='Y:\FY14 Strategic Plan\BU Templates\Consolidated and Parsed by Template\Initial Test\[Copy of Manual_Schedules_BU_Strat Plan_final TEST.xlsx]Brand Sales'!C32
where the link address changes obviously depending on the cell address. This is probably superfluous, but I figured I'd provide.
Here is my code so far (dimming and such omitted.) It just isn't working. The inStr function seems to be returning, like everything. I clearly don't have a good grasp of cycling through a worksheet. I appreciate your advice:
With Worksheets("NA Region")
For Each rCell In Range("B7:AG79")
If InStr("=Y:\", "=Y:\") <> 0 Then
.With ActiveCell
.Formula = "=sum('CP:2996_LE'!" & .Address & ")"
End With
End If
Next
End With
Thanks!
Bookmarks