close

I built the following macro to edit cell references in links to an adjacent
page, and it works great- even though it must be updated daily. Basicly, it
changes the link from b to c, then c to d...t to u, etc as the days of the
month go by... It has a shortcoming- on the 20th of the month, with formulas
such as =T532-AT532; the macro changes AT to AU. ( see macro below ) I have
been running a manual find and replace on the single column range effected to
restore the AT from AU. I'm sure there is a better tool for the job, but I'm
no expert....any good ideas? tia, Matt

Range(quot;AT514,AT517:AT602,AT604:AT633quot;).Select
Range(quot;AT604quot;).Activate
ActiveWindow.SmallScroll Down:=-95
Range(quot;AT514,AT517:AT602,AT604:AT633,AV517:AV602,A V571:AV633quot;).Select
Range(quot;AV571quot;).Activate
ActiveWindow.LargeScroll Down:=-3

Range(quot;AT514,AT517:AT602,AT604:AT633,AV517:AV602,A V571:AV633,AY514,AY517:AY602,AY604:AY633quot; _
).Select
Range(quot;AY604quot;).Activate
ActiveWindow.SmallScroll Down:=-99
Range( _

quot;AT514,AT517:AT602,AT604:AT633,AV517:AV602,AV571:A V633,AY514,AY517:AY602,AY604:AY633,BA517:BA602,BA5 71:BA633quot; _
).Select
Range(quot;BA571quot;).Activate
Selection.Replace What:=quot;Tquot;, Replacement:=quot;Uquot;, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()