Well, the code seems to be fine only.
I suggest you check this out-
- Verify that the "TEST" sheet's data entry code is pointing to the appropriate range for entering the data. Make sure your data entry code on the "TEST" sheet specifically refers to the range D18:D27.
- Look for any other code or event handlers that might be interfering: It's likely that the workbook's other event handlers or code, which are activated when data is input, are sending the data entry to the incorrect sheet.