So, I need some help deleting blank cells, or adjusting my code to only copy cells in the range that have a value. Here are the steps:
Also, this site always used to come up when I would search for some excel answers, but for some reason never pops up anymore.
Here is the code:
Thank you for your help everyone.
- Copy Range B2:B2000 (which has formulas in it)
- Paste the Values of that Range into J2:J2000
- Then copy that range however many times the user wants it copied into one column. I was able to get this to work, but there are blanks copied over.
Also, this site always used to come up when I would search for some excel answers, but for some reason never pops up anymore.
Here is the code:
Code:
Sub copy()
Dim mR As Range
Worksheets("UserStoreList").Range("B2:B2000").Copy
Worksheets("UserStoreList").Range("J2:J2000").PasteSpecial xlPasteValues
Set mR = Worksheets("UserStoreList").Range("J2:J2000")
Dim HowManyTimes As Integer: HowManyTimes = Worksheets("US Form").Range("D52")
mR.Copy Worksheets("Sheet2").Range("A2").Offset(0).Resize(mR.Rows.Count * HowManyTimes)
Worksheets("UserStoreList").Range("J2:J2000").Delete
End Sub
Thank you for your help everyone.