+ Reply to Thread
Results 1 to 3 of 3

Data Validation - If Row is hidden Value = ""

  1. #1
    Registered User
    Join Date
    12-28-2011
    Location
    Here
    MS-Off Ver
    Excel 2007
    Posts
    43

    Data Validation - If Row is hidden Value = ""

    Hi Guys,

    I am not the best with the programming side yet, and I am working with the data validation function trying to figure out how I can make certain cells blank if they become hidden.

    Say for example someone chose "Yes" and started to fill out rows 35 and 36, and then decided that they did not actually want "Yes" in G34, so switched it to "No". The cells become hidden, but the actual data validation boxes still contain what they selected for G35 and G36. How can I have it so that when the rows are hidden the cell value would be blank?

    Here is some of the code I am working with.

    If Target.Address = "$G$34" Then
    Application.EnableEvents = False
    Select Case Target.Value
    Case "Yes"
    Rows("35").Hidden = False
    Rows("37").Hidden = False
    Rows("38").Hidden = False
    Rows("204").Hidden = False
    Rows("206").Hidden = False
    Rows("208").Hidden = False
    Case "No"
    Rows("35:39").Hidden = True
    Rows("204:209").Hidden = True
    End Select
    Application.EnableEvents = True
    End If
    Attached Files Attached Files
    Last edited by BobBing; 03-08-2012 at 08:09 PM.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Data Validation - If Row is hidden Value = ""

    It would be a pleasure to answer your thread but you must first comply with rule #3 and enclose you code in CODE TAGS.
    Refer to rules for detailed instructions to do so.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Data Validation - If Row is hidden Value = ""

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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