+ Reply to Thread
Results 1 to 4 of 4

Hiding Rows based on a cell Value that is a result of a formula

  1. #1
    Registered User
    Join Date
    07-24-2014
    Location
    Florida
    MS-Off Ver
    Office 2007
    Posts
    2

    Hiding Rows based on a cell Value that is a result of a formula

    Hey Guys i have a sheet where im trying to have rows Hide or Un-hide off of a Yes/No.

    Initially i had the value be a manual input from a validation list (Yes/No) and the script worked fine:

    If Range("D10").Value = "Yes" Then
    Rows("153:191").EntireRow.Hidden = False
    ElseIf Range("D10").Value = "No " Then
    Rows("153:191").EntireRow.Hidden = True
    End If
    I had to split the table onto two separate worksheets so i could lock one through scripting. Now the value is being placed by a formula:

    =IF('HRC Inputs'!D10:E10="","",IF('HRC Inputs'!D10:E10="Yes","Yes","No"))

    How can i make the scripting still trigger off of the value in the cell if it is placed there by a formula and not manually inputted?

    Thank you!

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Hiding Rows based on a cell Value that is a result of a formula

    try manipulating:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-24-2014
    Location
    Florida
    MS-Off Ver
    Office 2007
    Posts
    2

    Re: Hiding Rows based on a cell Value that is a result of a formula

    Quote Originally Posted by jewelsharma View Post
    try manipulating:
    Please Login or Register  to view this content.
    i tried:
    Please Login or Register  to view this content.
    It still will not hide the rows unless i manually input the Yes or No.

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Hiding Rows based on a cell Value that is a result of a formula

    I think Range.HasFormula can only return True or False. It cannot be "Yes" or "No". So please try the following again:
    Please Login or Register  to view this content.
    Let us know if anything.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] (SOLVED) Hiding rows based on a cell value that comes from a formula
    By Dbouwheer in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-26-2014, 08:15 AM
  2. Hiding Rows based on Formula result
    By Viscount_Grey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-21-2011, 08:59 AM
  3. Hiding worksheets based on cell result
    By BaldySlaphead in forum Excel General
    Replies: 3
    Last Post: 12-19-2006, 04:45 PM
  4. Hiding rows based on cell result
    By BaldySlaphead in forum Excel General
    Replies: 8
    Last Post: 12-15-2006, 11:57 AM
  5. Hiding column based on formula result.
    By Casey in forum Excel General
    Replies: 1
    Last Post: 04-13-2005, 11:36 AM

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