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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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,225,847
Messages
6,187,366
Members
453,420
Latest member
ESCH1021

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