Results 1 to 10 of 604

Thread: Appendix-Thread-Evaluate-Range-(-Codes-for-other-Threads-HTML-Tables-etc-)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    in support of this post:
    https://excel.tips.net/T001940_Hidin...ell_Value.html
    https://excel.tips.net/T001940_Hiding_Rows_Based_on_a_Cell_Value.html



    Hello Ryanne
    Rather than modifying the coding, it would probably be easier to use a simple "events" type coding which automatically kicks in when a range value is changed in a worksheet. Something of this form:.

    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
     Target.EntireRow.Hidden = True
    End Sub
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    'Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    '
    'End Sub
    This coding will need to be in a worksheet code module.
    Follow , for example these 6 steps to create such a coding:

    _1) Right click on the tab of the worksheet of interest
    _2) Select View Code
    Worksheet code module via View Code after right click on tab.JPG : : https://imgur.com/ZiOuRVT
    Attachment 2426

    _3) Select the left side drop down list
    _4) Select Worksheet
    Worksheet.JPG : https://imgur.com/tCwHKBo
    Attachment 2427

    _5) Select the right drop down list
    _6) Select Change
    Change.JPG : https://imgur.com/NkbNPsL
    Attachment 2428

    ( Delete or ' comment out any other coding, such as the Private Sub Worksheet_SelectionChange which may have appeared automatically at step 4 )



    You can now add your coding within the Private Sub Worksheet_Change


    ( Hit Alt+F11 to return to spreadsheet view )

    The coding will kick off automatically when you change any cell value. It will hide the entire row which contains the cell whose value you changed


    In the uploaded file , I have added the coding to the third worksheet code module

    Alan
    Attached Images Attached Images
    Attached Files Attached Files

Similar Threads

  1. Testing Concatenating with styles
    By DocAElstein in forum Test Area
    Replies: 2
    Last Post: 12-20-2020, 02:49 AM
  2. testing
    By Jewano in forum Test Area
    Replies: 7
    Last Post: 12-05-2020, 03:31 AM
  3. Replies: 18
    Last Post: 03-17-2019, 06:10 PM
  4. Concatenating your Balls
    By DocAElstein in forum Excel Help
    Replies: 26
    Last Post: 10-13-2014, 02:07 PM
  5. Replies: 1
    Last Post: 12-04-2012, 08:56 AM

Posting Permissions

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