Results 1 to 5 of 5

Not understanding the macro issue

Threaded View

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    DSM
    MS-Off Ver
    Excel 2007
    Posts
    5

    Not understanding the macro issue

    So I am working with a similar questionaire/interview list as attached. I am using Excel 2007 and I need to get a macro to populate certain rows based off of a cell that has text of YES or NO.

    I managed to get the FIRST question to work with the macro- my issue is don't know what I am doing now.

    So I have (as you can see) multiple sets of hidden rows. (most are grouped for markers right now)

    I need for the cell that says YES or NO to either keep a row hidden or show a row but i need it to do it multiple times. (with different questions)

    Here is an example:

    I have cell C35 with Yes- then row 36 stays hidden. If cell C35 says NO- then row 36 shows. This part I have down.

    Now I want to continue adding things- for instance- if cell C43 says NO- then I want the rows 44-48 to stay hidden. If cell C43 says YES- I would like it to SHOW rows 44-48.

    I hope I am making this clear? My issue is that I am CLUELESS with macros and the script. I am attempting to teach myself/learn from others on the forums. Any help would be appreciated. I am attaching my .xlsm.

    PLEASE HELP! I don't understand if I can put more subs under one event or if I have to make a new event- or if thats possible on one sheet. I am just clueless. Any tips/tricks are much appreciated. I just can't seem to find what I am looking for when I search for what I need!!

    Thank you for your time Please don't be too harsh with my lack of knowledge! lol.











    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    
        If Not Intersect(Target, Range("C35")) Is Nothing Then
            Rows(36).Hidden = (Target.Value = ("Yes")) + (Target.Value = (""))
    
        End If
    
    End Sub
        Sub show()
       With Range("c35").EntireRow
    
            Rows(36).ShowDetail = (Target.Value = "No")
        End
        
    End Sub
        
       
        If Not Intersect(Target, Range("C44")) Is Nothing Then
            Rows(44 - 48).Hidden = (Target.Value = ("No")) + (Target.Value = (""))
    
        End If
       Sub show1()
      With Range("c44").EntireRow
    
            Rows(44 - 48).ShowDetail = (Target.Value = "Yes")
        End
        
    End Sub
    Attached Files Attached Files
    Last edited by Cutter; 10-20-2012 at 06:11 PM. Reason: Added code tags

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