Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Macro to Convert indirect function to direct links

I am looking for a visual basic macro that would do the following:

Convert an indirect function into a direct link. I have a variety of
indirect functions in a file that link to external files, and as the
indirect function is volatile, these fields "#ref" out when the files
are closed. Rather than redo all of these to be direct links, I would
like a macro that goes through and converts the indirects to direct
links. Since all the information is on the sheet and in the formula,
it seems like it should be straightforward, but is beyong my simple
VBA programming abilities.


For greater clarity, I am using the following types of indirect
functions:

SUM(INDIRECT("'"&E$8&E$9&"'"&"!"&E$10&$A18&":"&E$1 1&$A18))

Where E$8 is filename (e.g. "File")
E$9 is the sheet name (e.g. "Sheet1")
E$10 is the beginning column (e.g. "D")
E$11 is the ending column (e.g. "F")
$A18 is the row (e.g. 10)

So the macro would convert the above macro to:

SUM('[File]Sheet1'!$D$10:$F$10)

I would like this macro to be made generic so it applies to different
indirect functions (e.g. some are sums, some are single links), and to
be set up so I can run it for all indirects that are currently
selected (e.g. I highlight a range of cells, hit the macro shortcut
key, and all indirects in those cells are converted to direct links,
and cells with other formulas are not affected.

I put this in as a google answers post too, if anyone wants the money!

http://answers.google.com/answers/threadview?id=711588

Thanks in advance

PC
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
Updating links specified with INDIRECT simonc Excel Discussion (Misc queries) 2 September 8th 08 03:32 PM
Indirect links jnix Excel Discussion (Misc queries) 5 February 23rd 06 06:28 AM
Error using Excel add-in with INDIRECT.EXT function Barb Reinhardt Excel Discussion (Misc queries) 3 October 6th 05 04:54 PM
Using Indirect en direct cell references Bart Schouw Excel Discussion (Misc queries) 2 January 13th 05 01:05 PM
Convert Excel Functions to VBA Macro Function Simon Corner Excel Programming 3 April 2nd 04 11:58 AM


All times are GMT +1. The time now is 09:56 AM.

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

About Us

"It's about Microsoft Excel"