excluding rows in select case with vba

DeezNuts

Board Regular
Joined
Aug 12, 2014
Messages
177
I am trying to make is so this script will ignore rows 1 through 5 but work on any >5

So basically I am trying to get this script to ignore the entire first 5 rows all the way across from A1:XFD5

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Column
    Case Is = 4, 10, 16, 22, 28
Application.EnableEvents = False
        If Target.Value >= "0" Then
        Target.Offset(0, -1).Value = Now
        Target.Offset(1, -1).Value = "Submitted"
    Else
        Target.Offset(1, -1).Value = "Not Submitted"
    End If
    Application.EnableEvents = True
End Select
End Sub

I tried to add Case .Row >5 under Case Is = but that did not do it. Any and help is welcome.
 
Last edited:

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If target.row >5 then
Select Case Target.Column
    Case Is = 4, 10, 16, 22, 28
Application.EnableEvents = False
        If Target.Value >= "0" Then
        Target.Offset(0, -1).Value = Now
        Target.Offset(1, -1).Value = "Submitted"
    Else
        Target.Offset(1, -1).Value = "Not Submitted"
    End If
    Application.EnableEvents = True
End Select
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,226,217
Messages
6,189,688
Members
453,563
Latest member
Aswathimsanil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top