Hiding entire row is value in status column is changed to "closed"
Hello I am a complete noob at vba and macros I have a basic understanding of excel but am really battling at this point. I have to create a "EventMacro " for sheet called "MOpen" Basically what I have its a excel spread sheet that records data such as Location, Job Required, Reported by, Responsible for, Status, date open, date closed, comments etc. Basically when a job is called in the individual record the above mentioned conditions in the spread sheet and selects "Open" from the drop down box under the status column. When the job is complete they select "Closed" from the drop box. basically what I want is that the macro or vba or whatever automatically hides that entire row when the status is changed from open to closed. i have gotten a code that i tried and it worked like a bomb but wouldn't allow me to alter the information on the sheet unless i clicked on the design mode icon on the toolbox thread thing (The one at the top of the sheet ha ha ) i want it to allow me to change the information in the sheet and only when the status is change from open to closed it must automatically hide the row. I have gotten to this point of right clicking on the sheet tab selecting view code, and inserting this code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("I:I")) Is Nothing Then Exit Sub 'Check if status column was changed
Const BeginRow As Integer = 3
Const EndRow As Integer = 100
Const ChkCol As Integer = 9
Dim RowCnt As Integer
Application.ScreenUpdating = False
For RowCnt=BeginRow To EndRow
Cells (RowCnt,ChkCol).EntireRow.Hidden = (Cells(RowCnt,ChkCol).Value = "Closed" )
Next RowCnt
Application.ScreenUpdating = True
End Sub
however when i go to the run icon in vba and click on it it brings up the create macro box where i should name and create a macro ... Now what i want to know is how on this green earth do i get the code mentioned above to run please tell me step by step as if you were showing a 4 year old to do this please help :(
Recent comments
5 years 34 weeks ago
6 years 20 weeks ago
6 years 32 weeks ago
6 years 35 weeks ago
6 years 36 weeks ago
6 years 42 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago