I need help importing an excel sheet into 3 access tables which are already
created.
I've got the first part going into the first table figured out, but i'm
stuck on the second part which is importing nonconsecutive excel rows into
the 2nd table. These are 12 rows with 14 rows in between each one. The data
in the rown in between will go into my 3rd table. Now i only want to import
these 12 rows if they meet a certain criteria.
Set currentCell = xlSheet.Range("A30")
For x = 0 To 120
[10]
If currentCell.Offset(x, 16) <> 0 Then
With rstCriteria
.AddNew
!TSID = TSID
!PgmNbr = xlSheet.Range("C5")
!EndDateYear = xlSheet.Range("L11")
!CriteriaSeq = currentCell.Offset(x, 0)
!CriteriaType = currentCell.Offset(x, 1)
!CalcBasis = currentCell.Offset(x, 2)
!BaseBegDateYear = currentCell.Offset(x, 3)
!BaseEndDateYear = currentCell.Offset(x, 6)
!CurrBegDateYear = currentCell.Offset(x, 9)
!CurrEndDateYear = currentCell.Offset(x, 12)
!ExclStor = currentCell.Offset(x, 15)
!InitPayment = currentCell.Offset(x, 16)
!TotCalc = currentCell.Offset(x, 17)
!PaymntRate = currentCell.Offset(x, 19)
!PaymntAmnt = currentCell.Offset(x, 20)
!HurdleRate = currentCell.Offset(x, 21)
.Update
End With
End If
Next x
Please point me in the right direction
Much thanks
--
VBA Rookie