NorthbyNorthwest
Board Regular
- Joined
- Oct 27, 2013
- Messages
- 173
- Office Version
- 365
I have a small bit of code I’d like to use listobjectlanguage with.
Code:
[FONT=Times New Roman][/FONT]
Private Sub Worksheet_Change(ByVal Target As Excel.Range)<o:p></o:p>
[FONT=Times New Roman][/FONT]
If Intersect(Target, [Z:Z]) Is Nothing Or Target.Count >1 Then Exit Sub<o:p></o:p>
[FONT=Times New Roman][/FONT]
Target.Offset(, 1)= Date<o:p></o:p>
[FONT=Times New Roman][/FONT]
Target.Offset(,2).Formula = "=IF(OR([@[Status Change]]=""Completed"",[@[StatusChange]]=""code yellow"",[@[StatusChange]]="""",[@[Date of StatusChange]]=""""),"""",TODAY()-[@[Date ofStatus Change]])"<o:p></o:p>
[FONT=Times New Roman][/FONT]
End Sub<o:p></o:p>
[FONT=Times New Roman][/CO[/FONT]DE]
[FONT=Times New Roman][/FONT]
I’ve tried swapping out the first line with:<o:p></o:p>
[FONT=Times New Roman][/FONT]
[CODE][FONT=Times New Roman][/FONT]
If Intersect(Target,Me.ListObjects("Table1").ListColumns(26).DataBodyRange) Is Nothing OrTarget.Count > 1 Then Exit Sub<o:p></o:p>
[FONT=Times New Roman][/CO[/FONT]DE]
I've also tried:
[CODE][FONT=Times New Roman][/FONT]
If Intersect(Target, Me.ListObjects("Table1").ListColumns(“StatusChange”).DataBodyRange) Is Nothing Or Target.Count > 1 Then Exit Sub<o:p></o:p>
[FONT=Times New Roman][/CO[/FONT]DE]
And, I've tried:
[CODE[FONT=Times New Roman]][/FONT]
If Intersect(Target, [Table1[ColumnZ]]) Is Nothing orTarget.Count>1 Then Exit Sub<o:p></o:p>
[FONT=Times New Roman][/C[/FONT]ODE]
What am I doing wrong?
[/COLOR]
[/SIZE]
[/FONT]
[FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT]