Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default List referenced columns in formulas?

I have a LARGE workbook that consists of a large block of data copied
out of our database (the "input block"), and a set of formulas that
combine the values to produce user-readable results (the "user
block").

I don't know beforehand what columns of data in the input block will
be referred to by formulas in the user block, that's up to the user.
What I would like to do is remove any unreferenced columns in the
input block, after the input block is copied in and recalculations
complete.

I can't seem to find any way to "get all the column references used in
this range" sort of method. Any pointers?

Maury
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default List referenced columns in formulas?

Check out the Precedents and Dependents properties. Maybe you can work with
that.

"Maury Markowitz" wrote:

I have a LARGE workbook that consists of a large block of data copied
out of our database (the "input block"), and a set of formulas that
combine the values to produce user-readable results (the "user
block").

I don't know beforehand what columns of data in the input block will
be referred to by formulas in the user block, that's up to the user.
What I would like to do is remove any unreferenced columns in the
input block, after the input block is copied in and recalculations
complete.

I can't seem to find any way to "get all the column references used in
this range" sort of method. Any pointers?

Maury

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default List referenced columns in formulas?

On Feb 23, 1:02*pm, JLGWhiz wrote:
Check out the Precedents and Dependents properties. *Maybe you can work with
that.


As it turns out, you can! The one annoyance is that Precedents returns
an error instead of null if there are none in the range, which means
you have to use a trap. Other than that it's pretty easy to use.
Simply loop over the area you're interested in, ask for a range's
Precedents.Areas, and record which columns are in use. Then delete the
ones that aren't. Excel's formula re-writer fixes everything up as
they're removed.

It cut my spreadsheet by about 10% in size.

Maury
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
Sorting list of referenced data M John Excel Discussion (Misc queries) 2 June 4th 09 03:03 PM
Can't view formulas referenced tab pablobandito Excel Discussion (Misc queries) 7 September 7th 07 09:30 PM
Excel Columns should be referenced in numbers not letters misterduck Excel Discussion (Misc queries) 5 February 2nd 06 05:31 PM
multiple columns / rows to be referenced through a listbox Hru48 Excel Discussion (Misc queries) 0 July 4th 05 04:12 PM
How to automatically change the referenced worksheet name in all formulas? [email protected] Excel Programming 2 May 17th 05 02:33 PM


All times are GMT +1. The time now is 06:28 PM.

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"