Visualizar las fórmulas utilizadas en una hoja Excel
12-21-2007
Silvia Villamarin in Trucos 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.


 

Article originally appeared on ApeSoft (http://blog.apesoft.es/).
See website for complete article licensing information.