Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Transfer Data from Input Form - Offset to different worksheet
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Transfer Data from Input Form - Offset to different worksheet
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 On 4 Mar, 18:38, wrote: 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Transfer Data from Input Form - Offset to different worksheet
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--- -- RyGuy " wrote: 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 On 4 Mar, 18:38, wrote: 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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Transfer Data from Input Form - Offset to different worksheet
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. On 5 Mar, 18:03, ryguy7272 wrote: 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--- -- RyGuy " wrote: 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 On 4 Mar, 18:38, wrote: 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.- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
transfer data from excel form to a spreadsheet | Excel Discussion (Misc queries) | |||
Transfer data to form from Excel range upon loading of form. | Excel Programming | |||
Form 2 Form data transfer | Excel Programming | |||
How do you transfer data from an input form in excel to an excel l | Excel Discussion (Misc queries) | |||
Input Form on Worksheet 1, Data on Worksheet 2 | Excel Programming |