Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
lee lee is offline
external usenet poster
 
Posts: 184
Default Expose formulas

Does anyone know how to list all the formulas in a worksheet and what cells
they are in?
Thanks in advance,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Expose formulas

Hi Lee

The below macro will identify all formulas from Sheet1 and list out in
Sheet2..with cell address and the formula in text format..Adjust to suit. Try
and feedback

Sub Mac()
Dim lngRow As Long: longRow = 1
For Each cell In Sheets("Sheet1").UsedRange
If Left(cell.Formula, 1) = "=" Then
lngRow = lngRow + 1
Sheets("Sheet2").Range("A" & lngRow) = cell.Address
Sheets("Sheet2").Range("B" & lngRow) = "'" & cell.Formula
End If
Next
End Sub



--
If this post helps click Yes
---------------
Jacob Skaria


"Lee" wrote:

Does anyone know how to list all the formulas in a worksheet and what cells
they are in?
Thanks in advance,

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Expose formulas


hi
another way would be to use the keyboard shortcut Ctrl + ~ .
this would allow you to toggle from normal view to formula view and back.

Regards
FSt1

"Lee" wrote:

Does anyone know how to list all the formulas in a worksheet and what cells
they are in?
Thanks in advance,

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Expose formulas


If Left(cell.Formula, 1) = "=" Then


Another possibility (a simpler one) for this line would be...

If cell.HasFormula Then

--
Rick (MVP - Excel)


"Jacob Skaria" wrote in message
...
Hi Lee

The below macro will identify all formulas from Sheet1 and list out in
Sheet2..with cell address and the formula in text format..Adjust to suit.
Try
and feedback

Sub Mac()
Dim lngRow As Long: longRow = 1
For Each cell In Sheets("Sheet1").UsedRange
If Left(cell.Formula, 1) = "=" Then
lngRow = lngRow + 1
Sheets("Sheet2").Range("A" & lngRow) = cell.Address
Sheets("Sheet2").Range("B" & lngRow) = "'" & cell.Formula
End If
Next
End Sub



--
If this post helps click Yes
---------------
Jacob Skaria


"Lee" wrote:

Does anyone know how to list all the formulas in a worksheet and what
cells
they are in?
Thanks in advance,


  #5   Report Post  
Posted to microsoft.public.excel.programming
lee lee is offline
external usenet poster
 
Posts: 184
Default Expose formulas

Thank you everyone. All your suggestions work perfectly.
Thanks again,

"FSt1" wrote:

hi
another way would be to use the keyboard shortcut Ctrl + ~ .
this would allow you to toggle from normal view to formula view and back.

Regards
FSt1

"Lee" wrote:

Does anyone know how to list all the formulas in a worksheet and what cells
they are in?
Thanks in advance,

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
How to Expose SeriesCollection? smartin Excel Programming 0 August 1st 08 02:04 AM
expose excel spreadsheet in web page Rea Excel Programming 0 April 30th 06 10:42 AM
VBA to expose details of zip files Chris Jones Excel Programming 7 January 31st 06 09:03 PM
Expose macros with add-in Dave Stice Excel Programming 6 January 30th 06 05:50 PM
How can I expose the actual column & row headers in excel? Juanita Excel Discussion (Misc queries) 1 December 1st 05 06:18 PM


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