Hi

Im not the best on coding, and have done this before, but cant seem to get it to work!! Usually i just use simple codes that allow lists to generate based on other values, but now i need to search for a specific row in a sheet to add a value to that row in a specific column.

My code is...

lastrow = Worksheets("Data2").Range("D1").End(xlDown).Row
Should it be
worksheet("Data2")
or

Range.("D1")
Could someone let me know whats wrong or missing please, ive tried a few different codes but keep getting the run-time error '9' message

Thank you Dan