In the attachment, sheet "Data" gets data pasted into Row5 every 5 secs from Sheet2 using code not shown.
The code below is called by another sub (not shown) to paste row 5 into row 8 and the past row data shunts down by one row. I'm looking to amend this code to make it more useful. A lot of the time row 5 will have duplicate data, specifically "Value1". The text/values that appear in row 5 as Constant1,2,3 will always be pasted. However, if Name1 or Name2, as they appear in row 5 are already duplicated in the table below, then Name1 or Name2, Value1, Value2 will NOT be pasted.
If the sheet is about to paste (5 secs is up) and looking at the attachment's row 5 you can see that 'Joe-40' has already been pasted below, so 'Joe-40 Value1 40 & Value2 50 will NOT be pasted. However Bill-38 is not a duplicate so will be pasted, plus associated Value1,2.
Sub Record_data() ' ' Record_data Macro ' Sheets("Data").Select Sheets("Data").Rows("5:5").Select Sheets("Data").Range("A5").Activate Selection.Copy Sheets("Data").Rows("8:8").Select Sheets("Data").Range("A8").Activate Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("Data").Rows("8:8").Select Sheets("Data").Range("A8").Activate Application.CutCopyMode = False Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove End Sub