![]() |
if statement
That worked great. I'd like to add one more thing to the mix if I could. I
need this code to run as the user tabs off the A5 cell. so basically they'll enter a value in A5. Then when they go to the next entry cell the code runs and the other rows are hidden if the value is fixed. Then, I'd also like to add two more If to this statement. so, If A5=fixed run this code or if A5=Broken run that code or if A5=repair then run the other code... All of the code by the way hides rows it just all hides different rows based on the vales. So, can I use an ElseIF statement? "JLGWhiz" wrote: Sub hahaMacro() If LCase(ActiveSheet.Range("A5").Value) = "fixed" Then Rows("5:13").Select Selection.EntireRow.Hidden = True End If End Sub "hshayhorn" wrote: I would like help writing some code that would run the code below if the value of cell a5 is the word "Fixed". Rows("5:13").Select Selection.EntireRow.Hidden = True |
All times are GMT +1. The time now is 04:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com