Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Create a list of formulas contained in a Workbook

I am trying to create a list of all of the formulas that are in a rather
large and complex(at least to me) workbook. I found where this topic was
answered back on 06/30/2006 (a Macro created by Chip), but I am unable to get
that solution to work. This could be for many reasons, primarily my inability
to understand and follow instructions. Any assistance would be appreciated. I
am using Excel 2003.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Create a list of formulas contained in a Workbook

This little macro looks at Sheet1. It produces a list of the formulas in
Sheet2. Column A will contain the address of the formula and column B will
contain the formula as a text string:

Sub ListFormulas()
Dim rr As Range
Dim s1 As Worksheet
Set s1 = Sheets("Sheet1")
Dim s2 As Worksheet
Set s2 = Sheets("Sheet2")
s1.Activate
Set rr = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas)
Dim sq As String
sq = Chr(39)
For Each r In rr
n = s2.Cells(Rows.Count, "A").End(xlUp).Row + 1
n = Application.WorksheetFunction.Max(2, n)
s2.Cells(n, "A").Value = r.Address
s2.Cells(n, "B").Value = sq & r.Formula
Next
End Sub

Macros are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To use the macro from the normal Excel window:

1. ALT-F8
2. Select the macro
3. Touch Run



To remove the macro:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm


--
Gary''s Student - gsnu201001


"covingj" wrote:

I am trying to create a list of all of the formulas that are in a rather
large and complex(at least to me) workbook. I found where this topic was
answered back on 06/30/2006 (a Macro created by Chip), but I am unable to get
that solution to work. This could be for many reasons, primarily my inability
to understand and follow instructions. Any assistance would be appreciated. I
am using Excel 2003.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Create a list of formulas contained in a Workbook

Thank you for your help. This worked for me and I only ended up with 34 pages
of formulas.

These forums have been a life saver and provided many solutions for me the
past several years. Thanks for all the hard work.

"Gary''s Student" wrote:

This little macro looks at Sheet1. It produces a list of the formulas in
Sheet2. Column A will contain the address of the formula and column B will
contain the formula as a text string:

Sub ListFormulas()
Dim rr As Range
Dim s1 As Worksheet
Set s1 = Sheets("Sheet1")
Dim s2 As Worksheet
Set s2 = Sheets("Sheet2")
s1.Activate
Set rr = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas)
Dim sq As String
sq = Chr(39)
For Each r In rr
n = s2.Cells(Rows.Count, "A").End(xlUp).Row + 1
n = Application.WorksheetFunction.Max(2, n)
s2.Cells(n, "A").Value = r.Address
s2.Cells(n, "B").Value = sq & r.Formula
Next
End Sub

Macros are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To use the macro from the normal Excel window:

1. ALT-F8
2. Select the macro
3. Touch Run



To remove the macro:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm


--
Gary''s Student - gsnu201001


"covingj" wrote:

I am trying to create a list of all of the formulas that are in a rather
large and complex(at least to me) workbook. I found where this topic was
answered back on 06/30/2006 (a Macro created by Chip), but I am unable to get
that solution to work. This could be for many reasons, primarily my inability
to understand and follow instructions. Any assistance would be appreciated. I
am using Excel 2003.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Create a list of formulas contained in a Workbook

You are very welcome. Thanks for the feedback!
--
Gary''s Student - gsnu201001


"covingj" wrote:

Thank you for your help. This worked for me and I only ended up with 34 pages
of formulas.

These forums have been a life saver and provided many solutions for me the
past several years. Thanks for all the hard work.

"Gary''s Student" wrote:

This little macro looks at Sheet1. It produces a list of the formulas in
Sheet2. Column A will contain the address of the formula and column B will
contain the formula as a text string:

Sub ListFormulas()
Dim rr As Range
Dim s1 As Worksheet
Set s1 = Sheets("Sheet1")
Dim s2 As Worksheet
Set s2 = Sheets("Sheet2")
s1.Activate
Set rr = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas)
Dim sq As String
sq = Chr(39)
For Each r In rr
n = s2.Cells(Rows.Count, "A").End(xlUp).Row + 1
n = Application.WorksheetFunction.Max(2, n)
s2.Cells(n, "A").Value = r.Address
s2.Cells(n, "B").Value = sq & r.Formula
Next
End Sub

Macros are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To use the macro from the normal Excel window:

1. ALT-F8
2. Select the macro
3. Touch Run



To remove the macro:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm


--
Gary''s Student - gsnu201001


"covingj" wrote:

I am trying to create a list of all of the formulas that are in a rather
large and complex(at least to me) workbook. I found where this topic was
answered back on 06/30/2006 (a Macro created by Chip), but I am unable to get
that solution to work. This could be for many reasons, primarily my inability
to understand and follow instructions. Any assistance would be appreciated. I
am using Excel 2003.

Thanks

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
List of functions contained in the add-ins, esp. Analysis Toolpak Neil Goldwasser Excel Worksheet Functions 3 January 12th 07 12:43 PM
create drop down list from different workbook Brett Excel Discussion (Misc queries) 2 August 18th 06 12:04 AM
Print All Excel Macros Contained in a Workbook Marvin Excel Discussion (Misc queries) 1 March 20th 06 10:13 PM
how can I imbed sheet names contained in cells into formulas? Ted Excel Worksheet Functions 2 March 8th 06 09:56 PM
view list of worksheets contained within a workbook michael Excel Worksheet Functions 3 May 9th 05 09:31 PM


All times are GMT +1. The time now is 05:46 PM.

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"