P
pm
I am trying to select rows that only include the totals...the row includes an
acct #, a sub and the word Total...so i am using mid to find the word total
in each row, then put the acct number in a separate sheet. For example here
are 3 rows from one of my sheets:
column D column L
11002-01256 41.11
11002-01256 62.76
11002-00707 Total 103.88
So i only want to select the last row, since it is the total and copy 11002
to the new sheet; AND i want to include the amount on my new sheet.
Set colDRange = ws.Range("D1:" & _
ws.Range("D" & Rows.Count).End(xlUp).Address)
For Each anyColDCell In colDRange
If Mid(anyColDCell, 13, 5) = "Total" Then
newFormula = "=MID('" & ws.Name & _
"'!R[3]C[3],1,5)"
echoSheet.Range("A" & Rows.Count). _
End(xlUp).Offset(1, 0).FormulaR1C1 _
= newFormula
acct #, a sub and the word Total...so i am using mid to find the word total
in each row, then put the acct number in a separate sheet. For example here
are 3 rows from one of my sheets:
column D column L
11002-01256 41.11
11002-01256 62.76
11002-00707 Total 103.88
So i only want to select the last row, since it is the total and copy 11002
to the new sheet; AND i want to include the amount on my new sheet.
Set colDRange = ws.Range("D1:" & _
ws.Range("D" & Rows.Count).End(xlUp).Address)
For Each anyColDCell In colDRange
If Mid(anyColDCell, 13, 5) = "Total" Then
newFormula = "=MID('" & ws.Name & _
"'!R[3]C[3],1,5)"
echoSheet.Range("A" & Rows.Count). _
End(xlUp).Offset(1, 0).FormulaR1C1 _
= newFormula