ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Transfer Data from Input Form - Offset to different worksheet (https://www.excelbanter.com/excel-programming/407105-transfer-data-input-form-offset-different-worksheet.html)

[email protected]

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.

[email protected]

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.



ryguy7272

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.




[email protected]

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 -




All times are GMT +1. The time now is 10:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com