LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   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

Hi guys,

I need help for a sub which can change existing formulas in col D
which refers to a particular sheetname, to an equivalent which
uses INDIRECT() reading the same sheetname now placed in D3 instead

For example:

Need to change existing: =SUM('1'!G33:M33)-'1'!L33

to

:=SUM(INDIRECT("'"&D$3&"'"&"!G33:M33"))-INDIRECT("'"&D$3&"'!L33")

The sheetname: "1" (without the double quotes) is entered into D3

There's quite a fair bit of cells involved in col D
which carries similar formulas to be changed,
so automating the formula change would be very useful.

(And once the entire col's formulas have been changed,
I could just simply fill col D across another 30 or so columns.
The sheetnames: "1", "2", "3", etc represent the days of the month)

Thanks for insights
--
Rgds
Max
xl 97
---
Please respond in thread
xdemechanik <atyahoo<dotcom
----


 
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 03:35 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"