Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Changing linked formula

I have linked formulas in several workbooks and sheets - I need to change one
of the line numbers in all of them - ..."\Monthly 2008\June 08\[1Charge
Sheet.xlsx]Mon'!$B$5" - I need to change the 5 to a 6. Everything else stays
the same - the Mon changes to each day of the week and the columns are the
same on all the sheets. I used the Find and Replace - putting in "$*$5" will
bring up all the ones I need to change (all of them came up in the find
window) but I can not find a way to change them in the replace window. If I
have to do this one at a time there could be as many as 400 entries - if I
can do it by page there will be only 40 or 50 ... Please - can someone help
me!!!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Changing linked formula

you can give something like this a shot:

Sub test()
Dim cell As Range
Dim rng As Range
Dim ws As Worksheet
' i used this formula =Sheet2!$B$5 for testing
Set ws = Worksheets("Sheet1")
Set rng = ws.Range("A1:A6")
For Each cell In rng
cell.Formula = Replace(cell.Formula, "$5", "$6", 1)
Next

End Sub


--


Gary


"jolowe" wrote in message
...
I have linked formulas in several workbooks and sheets - I need to change one
of the line numbers in all of them - ..."\Monthly 2008\June 08\[1Charge
Sheet.xlsx]Mon'!$B$5" - I need to change the 5 to a 6. Everything else stays
the same - the Mon changes to each day of the week and the columns are the
same on all the sheets. I used the Find and Replace - putting in "$*$5" will
bring up all the ones I need to change (all of them came up in the find
window) but I can not find a way to change them in the replace window. If I
have to do this one at a time there could be as many as 400 entries - if I
can do it by page there will be only 40 or 50 ... Please - can someone help
me!!!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP...Draging cell without changing Formula linked to cell Wilco Excel Discussion (Misc queries) 4 February 5th 11 10:44 AM
Problem with changing formula linked to another worksheet Meenie Excel Worksheet Functions 10 February 29th 08 05:21 PM
Changing a linked formula ... ... ... Mserp Excel Worksheet Functions 0 November 15th 06 04:06 PM
"Formula too long" when changing linked sources?? fred at pha Excel Discussion (Misc queries) 2 July 20th 06 03:18 PM
Changing Filename when linked to other worksheets Amanda Excel Discussion (Misc queries) 1 October 25th 05 06:06 AM


All times are GMT +1. The time now is 11:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"