Sub lookForRecords()
Application.ScreenUpdating = False
Dim i As Integer, j As Integer
Dime sourceSheet As String, lookUpSheet As String
sourceSheet = "Sheet1" 'change Sheet1 accordingly
lookUpSheet = "Sheet2" 'change sheet2 accordingly
accountCol = "A"...
Correction:
Sub insertRows()
Dim i As Integer, j As Integer, rowsToInsert As Integer
rowsToInsert = 0
colLetter = "A" 'change this to the column letter you are using, i.e. "R"
records = Application.CountA(ActiveSheet.Range(colLetter & ":" & colLetter))
'sum all rows to add
For i = 1 To...
The following code should do it.
Sub insertRows()
Dim i As Integer, j As Integer, rowsToInsert As Integer
colLetter = "A" 'change this to the column letter you are using, i.e. "R"
records = Application.CountA(ActiveSheet.Range(colLetter & ":" & colLetter))
'sum all rows to add
For i = 1...
with the following code, you avoid of having to manually change the range in your code as rows of records decreases or increases.
records = Application.CountA(ActiveSheet.Range("A:A"))
dim i as integer
For i = 2 to records
strCellValue = Range("B" & i) & Range("C" & i)
If...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.