ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sumproduct by date and number (https://www.excelbanter.com/excel-discussion-misc-queries/163633-sumproduct-date-number.html)

AOP

sumproduct by date and number
 
I have a data table which have inputs of dates(A) and values(B). The data
table starts at row 4 to 2000.
Is there a way to find the date at which the sum total is 100. Then sum the
values under 100.
--
AOP

Don Guillett

sumproduct by date and number
 
Sub dototals()
lr = Cells(Rows.Count, "f").End(xlUp).Row
For Each c In Range("f1:f" & lr)
mysum = mysum + c
If mysum = 100 Then
sr = c.Row + 1
Exit For
End If
Next
MsgBox sr
MsgBox Application.Sum(Range(Cells(sr, "f"), Cells(lr, "f")))
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"AOP" wrote in message
...
I have a data table which have inputs of dates(A) and values(B). The data
table starts at row 4 to 2000.
Is there a way to find the date at which the sum total is 100. Then sum
the
values under 100.
--
AOP



AOP

sumproduct by date and number
 
Thank you Don
I take it I cant have the same in a formula or conditional format?
--
AOP


"Don Guillett" wrote:

Sub dototals()
lr = Cells(Rows.Count, "f").End(xlUp).Row
For Each c In Range("f1:f" & lr)
mysum = mysum + c
If mysum = 100 Then
sr = c.Row + 1
Exit For
End If
Next
MsgBox sr
MsgBox Application.Sum(Range(Cells(sr, "f"), Cells(lr, "f")))
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"AOP" wrote in message
...
I have a data table which have inputs of dates(A) and values(B). The data
table starts at row 4 to 2000.
Is there a way to find the date at which the sum total is 100. Then sum
the
values under 100.
--
AOP





All times are GMT +1. The time now is 04:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com