Good afternoon,
Just a quick question regarding VBA,
I would like to have three buttons that are programmed to enter the results of A2:D2 depending on what trial the results are from, and paste them to a database on a separate sheet.
One way around this I believe is to use the offset function, asking for the data to be copied and +2 empty columns next to each individual result.
So it should look like;
Trial 1a Trial 2a Trial 3a Trial1b Trial2b Trial3b
B2(A2data), C2(empty), D2(empty), E2(B2data), F2(empty), G2(empty)...etc
This would be the first button to enter trial 1 in the first of the 3 columns
The second button could have the same function but start from B3 (shifted one place to the right).
The third would follow suit but start in B4 (shifted two places to the right).
This is what it currently looks like which copies the data from one sheet to another, inserting to the next available row below, but doesn't include the offset.
Sub Oval3_Click()
Sheets("CMJInput").Select
Range("E7:L7").Select
Application.CutCopyMode = False
Selection.Copy
With Sheets("CMJDatabase")
lst = .Range("C" & Rows.Count).End(xlUp).Row + 1
.Range("C" & lst).PasteSpecial xlPasteColumnWidths
.Range("C" & lst).PasteSpecial xlPasteValues
End With
End Sub
Please help with the offset columns input scripting.
Thanks
Tom
Just a quick question regarding VBA,
I would like to have three buttons that are programmed to enter the results of A2:D2 depending on what trial the results are from, and paste them to a database on a separate sheet.
One way around this I believe is to use the offset function, asking for the data to be copied and +2 empty columns next to each individual result.
So it should look like;
Trial 1a Trial 2a Trial 3a Trial1b Trial2b Trial3b
B2(A2data), C2(empty), D2(empty), E2(B2data), F2(empty), G2(empty)...etc
This would be the first button to enter trial 1 in the first of the 3 columns
The second button could have the same function but start from B3 (shifted one place to the right).
The third would follow suit but start in B4 (shifted two places to the right).
This is what it currently looks like which copies the data from one sheet to another, inserting to the next available row below, but doesn't include the offset.
Sub Oval3_Click()
Sheets("CMJInput").Select
Range("E7:L7").Select
Application.CutCopyMode = False
Selection.Copy
With Sheets("CMJDatabase")
lst = .Range("C" & Rows.Count).End(xlUp).Row + 1
.Range("C" & lst).PasteSpecial xlPasteColumnWidths
.Range("C" & lst).PasteSpecial xlPasteValues
End With
End Sub
Please help with the offset columns input scripting.
Thanks
Tom