Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Displaying Cell Formulas
-- Richard |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Displaying Cell Formulas
I am assuming you want the formulas in you cells displayed without having to
double-click on them. The following macro will copy the contents of the active sheet and paste them as text on a new sheet: Sub Formulas_to_text() ' ' Formulas_to_text Macro ' Macro written 9/9/2006 by ChristopherTri ' ' Macro copies the contents of the active sheet and pasts them onto a ' new sheet as text. ' Dim test_formula() As Variant new_column_width = 20 'Set width of columns on new sheet lastRow = ActiveSheet.UsedRange.Rows.Count 'find the last row of the worksheet lastColumn = ActiveSheet.UsedRange.Columns.Count 'find the last column of the worksheet ReDim test_formula(lastRow, lastColumn) As Variant 'Dimension array to fit used range ' ' Copy formulas into array ' For test_row = 1 To lastRow For test_column = 1 To lastColumn test_formula(test_row, test_column) = ActiveSheet.Cells(test_row, test_column).Formula Next test_column Next test_row Sheets.Add 'Add a new sheet ' ' Paste contents of array into new sheet as text ' For test_row = 1 To lastRow For test_column = 1 To lastColumn ActiveSheet.Cells(test_row, test_column) = "'" & test_formula(test_row, test_column) Next test_column Next test_row ' ' Format new sheet for better formula viewing ' ActiveSheet.UsedRange.Select With Selection .ColumnWidth = new_column_width .WrapText = True End With End Sub After running the macro, you can either print or view as needed. "Stranded" wrote: -- Richard |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Displaying Cell Formulas
Go Tools / Options
Select the View tab Under Windows options, select the Formulas checkbox You may quickly change your mind about showing formulas, but this will do the trick. Ryan "Stranded" wrote: -- Richard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel sees cell formulas as constants, will not solve | Excel Worksheet Functions | |||
Copying formulas from cell to cell to cell to....... | Excel Discussion (Misc queries) | |||
change cell value greater than another cell value using formulas | Excel Worksheet Functions | |||
Cell references in formulas become text | Excel Discussion (Misc queries) | |||
Displaying in a cell the formula from another cell | Excel Discussion (Misc queries) |