sumproduct by date and number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
Thank you Don
I take it I cant have the same in a formula or conditional format?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top