I am trying to multiply two variables (be
LeaseQty ) to get the total of lines that have to be created.
I'm trying to use something like this:
'Calcular cantidad de lineas Dim ContractsQty As Range Set ContractsQty = vcr.Range("Q2:Q" & Cells(Rows.Count, 17).End(xlDown).Row) Dim LeaseQty As Range Set LeaseQty = Sheets("Pivot").Range("B2:B" & Cells(Rows.Count, 2).End(xlDown).Row) Dim TotalLines As Long Dim TotalContracts As Long TotalContracts = ContractsQty.Count Dim TotalLease As Long TotalLease = LeaseQty.Count Dim TotalofLines As Integer TotalofLines = TotalContracts * TotalLease
but throws the error
"Run-time error '6':" Overflow