+ Reply to Thread
Results 1 to 2 of 2

How to make a range of Cells / rows Visible or Invisible basis 1 input value

Hybrid View

  1. #1
    Registered User
    Join Date
    06-28-2012
    Location
    Manila
    MS-Off Ver
    Excel 2010
    Posts
    8

    Lightbulb How to make a range of Cells / rows Visible or Invisible basis 1 input value

    Hi,

    I am looking for an Excel Macro code which can activate a section of worksheet and make it visible for editing basis an input selected on 1 cell. With the changes in the input selection, different range should get activated and be visible.
    E.g.
    Step 1 - Input / choose option from cell A2 - Options being - 1. Completed 2. Pending (chosen from a Drop down list - Data validation)
    Step 2 - Basis Option 1 chosen, Cells A14:I45 becomes visible for the user to input data. Input is completed, data is saved by user.
    Step 3 - Option 2 is chosen, cells A50:I90 becomes visible for input.

    Till any of the options not chosen, A14:I90 are invisible.

    Kindly help me in writing the Macro code for the same.

    Thanks much for your help.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to make a range of Cells / rows Visible or Invisible basis 1 input value

    Hi Siddps,

    Here's a little code like you describe - it could be put into the Worksheet_Change event, targeting on "A2":

    Sub HideSome()
    Rows("14:90").Hidden = True
    If Range("A2") = 1 Then _
    Rows("14:45").Hidden = False
    If Range("A2") = 2 Then _
    Rows("50:90").Hidden = False
    End Sub
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1