Consulting

Results 1 to 2 of 2

Thread: text in cell in condition

  1. #1

    Question text in cell in condition

    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 named ReductionType. I want columns I:J to be hidden if the text in reductionType is "One Time". otherwise i want columns G:H hidden

    I have:

    Sub Macro3()


    Columns("G:J").EntireColumn.Hidden = False

    Dim reduction As String
    reduction = Range("ReductionType")
    IIf reduction = "One Time Premium Reduction", Columns("I:J").enitrecolumn.Hidden = True, Columns("G:H").EntireColumn.Hidden = True


    End Sub

    and i'm getting errors.
    any ideas please?

    thanks!

  2. #2
    i also tried with reduction = Range("reductionType").value

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •