Currently I have a code that loops between two sheets using a unique value in column to see if there is a new value to add to the second sheet. Here is a sample of the code I am using below.
i = 2 'First Row Of Data On RS_Temp Sheet
Do Until Cells(i, 15).Value = ""
WoNum = Cells(i, 1).Value
NotiNum = Cells(i, 2).Value
KeepSearching = True
RowNum = 4 'First Row Of Data On Available In R Systems Sheet
RS_Avail.Activate
Do Until KeepSearching = False
If Cells(RowNum, 15).Value = ScopeNum Then
Cells(RowNum, 1).Value = WoNum
Cells(RowNum, 2).Value = NotiNum
KeepSearching = False
ElseIf Cells(RowNum, 15).Value = "" Then
Cells(RowNum, 1).Value = WoNum
Cells(RowNum, 2).Value = NotiNum
KeepSearching = False
Else
RowNum = RowNum + 1
End If
Loop
i = i + 1
RS_Temp.Activate
Loop
Can someone help me to use header names instead of calling out column numbers ? the RS_Temp is a data sheet and my RS_Avail sheet has a table that the data gets added to. I am trying to make it more dynamic in case any of the headers change in our system that I export from. Appreciate the help.
i = 2 'First Row Of Data On RS_Temp Sheet
Do Until Cells(i, 15).Value = ""
WoNum = Cells(i, 1).Value
NotiNum = Cells(i, 2).Value
KeepSearching = True
RowNum = 4 'First Row Of Data On Available In R Systems Sheet
RS_Avail.Activate
Do Until KeepSearching = False
If Cells(RowNum, 15).Value = ScopeNum Then
Cells(RowNum, 1).Value = WoNum
Cells(RowNum, 2).Value = NotiNum
KeepSearching = False
ElseIf Cells(RowNum, 15).Value = "" Then
Cells(RowNum, 1).Value = WoNum
Cells(RowNum, 2).Value = NotiNum
KeepSearching = False
Else
RowNum = RowNum + 1
End If
Loop
i = i + 1
RS_Temp.Activate
Loop
Can someone help me to use header names instead of calling out column numbers ? the RS_Temp is a data sheet and my RS_Avail sheet has a table that the data gets added to. I am trying to make it more dynamic in case any of the headers change in our system that I export from. Appreciate the help.