I want to put a macro in into a =if formula.
Example
=if(A1="y",Name of Macro,"",)
The macro i want to use, unhides certain rows!
Can not figure out how to use the Macro i want to unhide
certain rows if answer in A1 = Y.
any help appreciated.
For that you need an event macro. One way:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address(False, False) = "A1" Then
If Target.Text = "y" Then
'unhide your rows
End If
End If
End Sub
Put this in the worksheet code module.
If A1 is calculated instead, use the Worksheet_Calculate event. See
http://cpearson.com/excel/events.htm
for more
In article <052101c2f9d4$707edb20$a301...@phx.gbl>, Mark Ravenscroft