_Change still would have nothing to do with the issue. Clicking on a hyperlink is not a change. A formula calculation is not a change, though it can be caused by a change in another precedent cell but maybe on a different sheet, so since the result needing to trigger a macro is formula-driven, a Calc event in the sheet module would be the safer bet given the choice between Change and Calc.
Thank you for your responses. I tried your suggestion but without success.
Perhaps if I get more specific you could give me a hand.
I am importing data from a delimited database and using autpen to activate the formatting macros. There is a varying field that requires different formatting depending on what is in the field. The way I would like the formula to read is:
=if(a1="Monday", Columns("B:B").Select.Selection.EntireColumn.Hidden = True, Columns("A:A").Select.Selection.EntireColumn.Hidden = True)
I realize this is combining Visual Basic with an excel formula. I just can't get the macro started and I know of no other way to hide columns automatically.
Thank You in advance for any help you can offer,
Well if it's an import at Open, you really don't need a formula at all, you need an If structure just like you laid out. In fact, it doesn't look like formulas are involved in any way with this based on your description.
Try this block of code to achieve what you say you are after - - just stick it in at the approriate point in your existing Autpen macro.
Range("A:B").EntireColumn.Hidden = False
If Range("A1").Value = "Monday" Then
Columns(2).EntireColumn.Hidden = True
Columns(1).EntireColumn.Hidden = True