Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Enumerate cell formulas

I have a client that creates Excel reports by using links to a large master
spreadsheet. The reports are constantly changing and needless to say the
process of checking to be sure that the links are referencing the right cells
in the master sheet is a painful task.

I am looking for a way to list the external references in worksheet formulas
to a text file that I can import into Access. I can then match these
references against a table of cell references in the master table.

I could use some help with this - my VBA experience is primarily in Access.
Is there an easier way to do the same thing?

Thanks in advance for your help.

Scott


--
Scott S
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Enumerate cell formulas

the code below finds all formulas on Sheet1 and saves the cell location and
formula in a text file.


Sub saveformulas()

Const ForReading = 1, ForWriting = 2, ForAppending = 3

Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0

Set fswrite = CreateObject("Scripting.FileSystemObject")

Folder = ThisWorkbook.Path

ChDir (Folder)
FName = Application.GetSaveAsFilename( _
fileFilter:="Text Files (*.txt), *.txt")

If FName < False Then
fswrite.CreateTextFile FName
Set fwrite = fswrite.GetFile(FName)
Set tswrite = fwrite.OpenAsTextStream(ForWriting, TristateUseDefault)

With Sheets("Sheet1")
Set Allformulas = _
.Cells.SpecialCells(Type:=xlCellTypeFormulas)
For Each cell In Allformulas
tswrite.writeline _
cell.Address & "," & cell.Formula
Next cell
End With
End If

End Sub


"ScottS" wrote:

I have a client that creates Excel reports by using links to a large master
spreadsheet. The reports are constantly changing and needless to say the
process of checking to be sure that the links are referencing the right cells
in the master sheet is a painful task.

I am looking for a way to list the external references in worksheet formulas
to a text file that I can import into Access. I can then match these
references against a table of cell references in the master table.

I could use some help with this - my VBA experience is primarily in Access.
Is there an easier way to do the same thing?

Thanks in advance for your help.

Scott


--
Scott S

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Enumerate cell formulas

Depending on your data structure, you may be able to benefit from my
freely-available workbook comparison utility. It can compare cell values or
formulas and produces an Excel report of the differences. You can compare
one or more columns and map them to any other columns in another worksheet.

www.higherdata.com


--
Tim Zych
www.higherdata.com
Compare data in workbooks and find differences with Workbook Compare
A free, powerful, flexible Excel utility

"ScottS" wrote in message
...
I have a client that creates Excel reports by using links to a large master
spreadsheet. The reports are constantly changing and needless to say the
process of checking to be sure that the links are referencing the right
cells
in the master sheet is a painful task.

I am looking for a way to list the external references in worksheet
formulas
to a text file that I can import into Access. I can then match these
references against a table of cell references in the master table.

I could use some help with this - my VBA experience is primarily in
Access.
Is there an easier way to do the same thing?

Thanks in advance for your help.

Scott


--
Scott S



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
Enumerate DSNs XP Excel Programming 2 May 22nd 07 06:47 PM
Compare multiple dates, can enumerate cell based on most recent date Brian Excel Worksheet Functions 7 May 9th 06 11:02 PM
enumerate sheet Philippe L. Balmanno Excel Worksheet Functions 4 January 4th 06 12:41 AM
how to enumerate? tendercare New Users to Excel 3 August 1st 05 06:15 PM
Is there any way to enumerate the cell which contain a formula? Aaron Queenan Excel Programming 1 February 12th 04 04:55 PM


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