Transfer Data from Input Form - Offset to different worksheet

M

mralmackay

Hi,

I have two sheets in my spreadsheet, the first which is 'an input
form' and the second which contains all of the data records.

The first sheet ("Input") contains the following titles:

A5 Case ID
B5 Date
C5 Resolver
D5 Details
E5 Resolution
F5 Notes

I need to transfer this data to sheet "Data". These titles all exist
within the Data Sheet on Row 1.

Therefore need a macro to do the following:
1) Check if A6 exists within sheet "Data", column A - If so, end
procedure with message "Record already exists")
2) If the outcome of 1 is that the record doesn't exist, the code
needs to copy A6:F6 from sheet "Input" to sheet "Data" and offset from
Row1 until the next empty row exists.

Appreciate your help as stuck on this and can find similar requests on
the newsgroups but not close enough to what I need.

Thanks in advance, Al.
 
M

mralmackay

Probably should have sent what I've been able to do so far, so
apologies for not including this on original post:

Sub CopyRow()
Sheets("Input").Range("5:5").Copy _
Sheets("Data").Range("A" & Rows.Count) _
.End(xlUp).Offset(1, 0)
End Sub
 
R

ryguy7272

I would use something like this:
Cells(1, 2) = TextBox1.Text

If OptionButton1 Then Cells(1, 2) = "Case ID"

If OptionButton3 = True Then
UserForm2.Show
End If

Does that help?
Ryan---
 
M

mralmackay

Hi Ryan,

I've had a mess with this (apols for the delay in responding) and this
is good.

Thanks for your help with this, much appreciated. Al.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top