LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Sub to change formulas in a col

Bob, thanks for your response !

The sheetname: "1" is now entered into D3
and I wanted to convert all existing formulas in col D
which presently referred to this sheetname,
via using INDIRECT() to reference D3 instead.

So ..
='1'!L43

would become: =INDIRECT("'"&D$3&"'!L43")

='1'!L17+'1'!L27+'1'!L47

would become:
=INDIRECT("'"&D$3&"'!L17")+INDIRECT("'"&D$3&"'!L27 ")+INDIRECT("'"&D$3&"'!L47
")

=SUM('1'!L23,'1'!L52)

would become: =SUM(INDIRECT("'"&D$3&"'!L23"),INDIRECT("'"&D$3&"' !L52"))

Hope the above clarifies a little better ..

Once the entire lot of formulas in col D is changed
to refer to D3 for the sheetname, it would then
be possible to do a simple fill of the formulas in col D
across another 30 cols (that's the ultimate objective).

--
Rgds
Max
xl 97
---
Please respond in thread
xdemechanik <atyahoo<dotcom
----
"Bob Phillips" wrote in message
...
Max,

Without some commonality you would struggle even with VBA. For instance,

you
said that
=SUM('1'!G33:M33)-'1'!L33
should change to
=SUM(INDIRECT("'"&D$3&"'"&"!G33:M33"))-INDIRECT("'"&D$3&"'!L33")

What rule that applies to that would be applied to
='1'!L43
as it is not clear to me.

Unless there is a clear rule/algorithm, or whatever, it will not be
possible.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)





 
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
formulas change when copied Sean Excel Discussion (Misc queries) 6 March 23rd 09 08:25 AM
formulas to change font Yonnie New Users to Excel 3 January 24th 09 07:43 PM
Change Formulas W/VBA jlclyde Excel Discussion (Misc queries) 1 December 23rd 08 02:19 PM
need to change linked formulas jolowe Excel Discussion (Misc queries) 1 June 6th 08 09:34 AM
Why does Excel change my formulas? cranston Excel Discussion (Misc queries) 2 July 15th 05 06:07 AM


All times are GMT +1. The time now is 10:12 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"