What I am trying to do is have a cell value checked for FOLD and if found select 13 cells in the row going left. Once the cells are selected I want to do a search and replace on an anchor value.
CurR and CurV are variables which are basically counters that increment in a loop. $2 and $3 are anchor values located on a second tab and hold values in two rows used for calculations.
Below is a sample of a calculation in which I want change the $2 to $3 =IF($C2=""," ",IF(Y2="SKID",0,INT(X2/Sheet2!$F$2)))
In debug the If through then is highlighted in yellow and the balance of the line is burgundy. On mouse over the variable values as well as the Range .Value appear to be correct.
My current attempt is below.
`enter code here`If Range(CurR).Value Like "*FOLD*" Then Range(CurV).Resize(, 13).Select
Selection.Replace What:="$2", Replacement:="$3", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False`enter code here`
Any help is appreciated. Thanks Much
Aucun commentaire:
Enregistrer un commentaire