Hello All,
this is in regards to my previous post
https://www.excelforum.com/excel-gen...heet-name.html
Im using the code below but when Im Adding, Deleting rows it keep showing me the error.
Please help me to remove the popping up error.Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("$B:$C")) Is Nothing Then Exit Sub Dim Lot1() As String Dim Lot2() As String Lot1 = Split(Cells(Target.Row, "B"), " ") Lot2 = Split(Cells(Target.Row, "C"), " ") Sheets(1).Name = Lot1(UBound(Lot1)) & " vs " & Lot2(UBound(Lot2)) End Sub
Attached is the file that Im using.
Thank you
Bookmarks