Oct 10 2018 07:31 PM
Hi Everyone,
Would like your expertise on this issue that I have.
Currently have figured out:
Sub AutoSum()
Const SourceRange = "D:E"
Dim NumRange As Range, formulaCell As Range
Dim SumAddr As String
Dim c As Long
For Each NumRange In Columns("D").SpecialCells(xlConstants, xlNumbers).Areas
SumAddr = NumRange.Address(False, False)
Set formulaCell = NumRange.End(xlUp).Offset(1, 0).Resize(1, 1)
formulaCell.Formula = "=SUM(" & SumAddr & ")"
c = NumRange.Count
Next NumRange
As shown in this diagram below:
That said, I would need to total up two separate columns from the same date as a total which I cannot have it figured out at all. Sample output ideally would look something like the following:
Logic should go as follows:
If amount and tax amount falls on the same date, it will be totaled up to the respective cells in red.
Thank you.