I am working with the following macros. I want to change the action of the macro depending on the value of a cell. If the cell = 1 then it should execute the second macro. If the cell = 2 then the macro should execute the first macro. Can anyone help.
Thanks in advance
Sub Callapes()
'
' Callapes Macro
'
'
Rows("5:11").Select
Selection.EntireRow.Hidden = True
Range("e12").Select
ActiveCell.FormulaR1C1 = "1"
Range("C12").Select
End Sub
Sub Expand()
'
' Expand Macro
'
'
Rows("4:12").Select
Selection.EntireRow.Hidden = False
Range("e12").Select
ActiveCell.FormulaR1C1 = "0"
Range("C12").Select
End Sub
Thanks in advance
Sub Callapes()
'
' Callapes Macro
'
'
Rows("5:11").Select
Selection.EntireRow.Hidden = True
Range("e12").Select
ActiveCell.FormulaR1C1 = "1"
Range("C12").Select
End Sub
Sub Expand()
'
' Expand Macro
'
'
Rows("4:12").Select
Selection.EntireRow.Hidden = False
Range("e12").Select
ActiveCell.FormulaR1C1 = "0"
Range("C12").Select
End Sub