ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   loop and sum (https://www.excelbanter.com/excel-programming/381860-re-loop-sum.html)

Jenna

loop and sum
 
Mike

Thanks so far

but its giving me the sum in column D instead of the value in column s where
the total is at least 3500

"Mike" wrote:

Jenna,
to save having lots of formula on your worksheet. right click the sheet tab
and view code and paste this in. Add a button to run it.

Sub doit()
For i = 1 To Cells(Rows.Count, "C").End(xlUp).Row

If Cells(i, "c").Value = 3500 Then

Cells(i, "d").Value = Cells(i, "c").Value

End If
Next i

End Sub

"jenna" wrote:


Please help

i need a procedure to loop down column c and the first row where the sum is
greater than 3500 put that amount in the adjacent column, then repeat from
the next row down.

thanks



All times are GMT +1. The time now is 06:01 AM.

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