« Exportar campos de gran tamaño a Excel con DataCycle Reporting | Main | Apesoft inaugura nueva oficina en Madrid »

Visualizar las fórmulas utilizadas en una hoja Excel

A veces puede ser interesante ver las fórmulas utilizadas en una hoja sin tener que ir casilla a casilla. A continuación se explica cómo podemos conseguir este efecto:

 ocultar_formulas_3.JPG

 Para ello, ir al Editor de Visual Basic, y, añadir en el ThisWorkbook el siguiente código:

 Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    
    Dim cell As Range
    
    For Each cell In Range("A1:E11")
        If cell.HasFormula Then
            cell.ClearComments
            cell.AddComment cell.Formula
            cell.Comment.Shape.TextFrame.AutoSize = True
        End If
    Next cell
End Sub

 

Nota: el rango "A1:E11", corresponde a las columnas y filas donde afecta este efecto.


 

Posted on 12-21-2007 by Registered CommenterSilvia Villamarin in | Comments Off

PrintView Printer Friendly Version

EmailEmail Article to Friend