Hi,
i'm trying to do something that i believe is really simple, and for some reason i can't get it to work.
i have a named range in my excel file named ReductionType in Sheet1. I want columns I:J in Sheet2 to be hidden if the text in reductionType is "One Time". otherwise i want columns G:H hidden.
I have:
and i'm getting errors.Sub Macro3() 'macro is called from Sheet2 Columns("G:J").EntireColumn.Hidden = False 'make sure all columns are unhidden Dim reduction As String reduction = Range("ReductionType") 'have also tried this with .value appended to the end of this line IIf reduction = "One Time Premium Reduction", Columns("I:J").enitrecolumn.Hidden = True, Columns("G:H").EntireColumn.Hidden = True End Sub
any ideas please? I'm at a loss....
thanks!



Reply With Quote
