PC Review


Reply
Thread Tools Rate Thread

Changing linked formula

 
 
jolowe
Guest
Posts: n/a
 
      6th Jun 2008
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 With Quote
 
 
 
 
Gary Keramidas
Guest
Posts: n/a
 
      6th Jun 2008
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" <(E-Mail Removed)> wrote in message
news:311E0C91-4E92-4B16-BE38-(E-Mail Removed)...
>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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with changing formula linked to another worksheet Meenie Microsoft Excel Worksheet Functions 10 29th Feb 2008 05:21 PM
Changing a linked formula ... ... ... =?Utf-8?B?TXNlcnA=?= Microsoft Excel Worksheet Functions 0 15th Nov 2006 04:06 PM
"Formula too long" when changing linked sources?? =?Utf-8?B?ZnJlZCBhdCBwaGE=?= Microsoft Excel Misc 2 20th Jul 2006 03:18 PM
Re: Changing a portion of a formula in multiple linked cells Ken Wright Microsoft Excel Worksheet Functions 0 24th Nov 2003 09:05 PM
Changing paths of linked tables without Linked Table Manger Ilka Microsoft Access Database Table Design 0 30th Jul 2003 01:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:58 PM.