This is the basic approach:
Option Explicit
Sub FormToDatabase()
'Transfer data from specific cells on a form sheet to a database sheet
Dim wsFORM As Worksheet, wsDATA As Worksheet, NR As Long
Set wsFORM = Sheets("MyForm")
Set wsDATA = Sheets("Database")
NR = wsDATA.Range("A" & Rows.Count).End(xlUp).Row + 1
With wsFORM
wsDATA.Range("A" & NR).Value = .Range("A1").Value
wsDATA.Range("B" & NR).Value = .Range("C10").Value
wsDATA.Range("C" & NR).Value = .Range("E11").Value
wsDATA.Range("D" & NR).Value = .Range("A12").Value
wsDATA.Range("E" & NR).Value = .Range("C15").Value
'etc, add more rows as needed
'now clear all the cells used above to reset the form
.Range("A1,C10,E11,A12,C15").ClearContents
End With
End Sub
Bookmarks