Posting attachments to newsgroups is bad netiquette, an alternative is presented below which displays all content.
In reality you could post plain text as shown below the table.
A1: Description A2: pens A3: pencils A4: Total B1: dozens B2: 3 B3: 2 C1: price/doz C2: 0.75 C3: 0.85 D1: Total D2: =B2*C2 Format: 0.00 D3: =B3*C3 Format: 0.00 D4: =SUM(D2:D3) Format: 0.00
A B C D E 1 Description dozens price/doz Total =getformula(D1) 2 pens 3 0.75 2.25 =B2*C2 3 pencils 2 0.85 1.70 =B3*C3 4 Total 3.95 =SUM(D2:D3) Descript unit price Total Total pens 3 0.75 2.25 =B2*C2 pencils 2 0.85 1.70 =B3*C3 Total - ---- 3.95 =SUM(D2:D3)code
Sub DocuCells() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Dim Cell As Range, iRow As Long Dim wsNeww As Worksheet, wsCurr As Worksheet iRow = 0 On Error Resume Next 'In case DocuCells sheet not exist Application.DisplayAlerts = False Worksheets("DocuCells").Delete Application.DisplayAlerts = True On Error GoTo 0 Set wsCurr = ActiveSheet Worksheets.Add ActiveSheet.Name = "DocuCells" Set wsNeww = ActiveSheet wsCurr.Activate On Error Resume Next 'in case no selection with content For Each Cell In _ Intersect(Selection, ActiveSheet.UsedRange) If Not IsEmpty(Cell) Then iRow = iRow + 1 wsNeww.Cells(iRow, 1) = Cell.Address(0, 0) & ": " wsNeww.Cells(iRow, 2) = "'" & Cell.Formula If Cell.NumberFormat <> "General" Then _ wsNeww.Cells(iRow, 3) = " Format: " & Cell.NumberFormat End If Next Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = True wsNeww.Select End Sub
Visit [my Excel home page] [Index page] [Excel Onsite Search] [top of this page]
Please send your comments concerning this web page to: David McRitchie send email comments
Copyright © 1997 - 2004, F. David McRitchie, All Rights Reserved