View Single Post
 
Old 05-16-2017, 01:47 AM
Challebjoern Challebjoern is offline Windows 10 Office 2007
Novice
 
Join Date: May 2017
Posts: 6
Challebjoern is on a distinguished road
Default Hide row based on value (different sheets)

Hey guys.

Been trying to write a formula (vba) to hide rows on sheet2 based on value in sheet1.
This is beacuse I use sheet1 to put in the data to make my business proposal which is shown in sheet2.

And since I don't always use all kind, it doesn't have to show the once who isn't offerd.

Code:
Sub HideRow()
    If Range("Blad1!E12").Value = 0 Then
        Rows("Blad2!10").EntireRow.Hidden = True
    Else
        Rows("Blad2!10").EntireRow.Hidden = False
    End If
End Sub
Tried using the one above but doesn't work. Also attached the workbook if you wanna take a look at it. Also, how would you write it to be hide more rows.

Hope you can crack this one for me!
Attached Files
File Type: xls Test.xls (78.0 KB, 18 views)
Reply With Quote