Say I have a rows 10-70 to drop a CSV into, and rows 71-130 are formulas to rearrange my data into a usable way. I want to special paste just values of rows 71-131 to row 132 and on, and from there copy and paste it again to a database. If I don't fill all rows from 10-70, is there a way to use a Count to determine how many rows past 132 to go?
MsgBox gives me a correct value of 28 for one of my CSV's (-1 for header line). is there a way to add that 28 to row 131 to essentially get Row("131:158").Copy?
Range("A160") is a temporary location, eventually it will past it to a different sheet row 2, and shift cells down..
VBA Code:
Sub CSVConv()
Dim ws As Worksheet
Dim TotRow As Integer
Dim CpyR As Range
TotRow = ActiveSheet.Range("A10:A70").Cells.SpecialCells(xlConstants).Count - 1
Rows("71:130").Copy
Range("A131").PasteSpecial Paste:=xlPasteValues
Rows("131" & TotRow).Copy Range("A160")
MsgBox TotRow
End Sub
MsgBox gives me a correct value of 28 for one of my CSV's (-1 for header line). is there a way to add that 28 to row 131 to essentially get Row("131:158").Copy?
Range("A160") is a temporary location, eventually it will past it to a different sheet row 2, and shift cells down..