So, I tried to edit/trim my original post and cannot find the button I thought I saw. This leads me here. I have figured out how to submit my userform and it populate on 4 subsequent rows in excel (e.g. 1A, 1B, 1C, and 1D are on rows 1, 2,3,and 4) of the sheet called "Data". SUCCESS!!
My challenge is now, how to select/activate copy/paste specifically from each row to specified locations? In my mind, I am thinking it should be a loop but have not figured it out quite yet. I have about 27 variables that are transferring over from A to AA for each line, and want it to copy/paste (typewriter style) to random cells like C2, H1, J4, T3, etc.
A range didn't work (for me anyways) because it is not a carbon copy of the entire line. Here is an example of one line...but imagine this four more times on 4 rows at a time.
When I hit submit, the Userform goes to "Data" and populates an entire row. This part seems to be operating today.
These are only two cells (A and B) on the same row. As you can see, they are pasting sporadically (and it gets mores sporadic throughout the other variables).ThisWorkbook.Sheets("Data").Activate NumRows = Range("A1", Range("A1").End(xlDown)).Rows.count ' Select cell a1. Range("A1").Select Range(z & Rows.count).EntireRow(xlDown).Activate ' Set loop?
Then, the calculations from "SampleResult" are copy/pasted to "USRMResultsAnalysis" on each row. This is my roadblock.' Copy RecordLocator from x: ThisWorkbook.Sheets("Data").Cells(z, 1).Copy 'A3 ' Paste to y worksheet: ThisWorkbook.Sheets("SampleResult").Range("av2").PasteSpecial Paste:=xlPasteValuesAndNumberFormats ' Copy Date from x: ThisWorkbook.Sheets("Data").Cells(z, 2).Copy 'B3 ' Paste to y worksheet: ThisWorkbook.Sheets("SampleResult").Range("av4").PasteSpecial Paste:=xlPasteValuesAndNumberFormats
I need help getting the vba to go all of one row through each sheet, down to the next row through the sheets, and etc. until all four rows have passed. Then I need to make sure that when the userform is executed, it will add to the next four rows (I think I have that one though) when done. Right now it is copying the first row 4 times and pasting it to USRMResultsAnalysis worksheet and I can't figure out why.ThisWorkbook.Sheets("SampleResult").Select z = ThisWorkbook.Sheets("USRMResultsAnalysis").Cells(Rows.count, 1).End(xlUp).Offset(1, 0).row ' Flask 4 ' Copy RecordLocator from x: ThisWorkbook.Sheets("SampleResult").Range("av2").Copy 'A3 ' Paste to y worksheet: ThisWorkbook.Sheets("USRMResultsAnalysis").Cells(z, 1).PasteSpecial Paste:=xlPasteValuesAndNumberFormats ' Copy Date from x: ThisWorkbook.Sheets("SampleResult").Range("av4").Copy 'B3 ' Paste to y worksheet: ThisWorkbook.Sheets("USRMResultsAnalysis").Cells(z, 2).PasteSpecial Paste:=xlPasteValuesAndNumberFormats
PLEASE HELP ME! I HAVE COME SOOOOOO FARRRRR!!!




Reply With Quote
