ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help on Codes for Accumulating Figures (https://www.excelbanter.com/excel-programming/334635-help-codes-accumulating-figures.html)

sylink[_2_]

Help on Codes for Accumulating Figures
 
Am trying to accumulate column E figures in column K based on groupings in
column A. I tried these codes but isnt working.

Dim z As Long
z = 3
Do While Range("A" & z) < ""
Range(K2).Value = Range(E2).Value
Range("A" & z).Select
If Range("A" & z).Text = Range("A" & z - 1).Text Then
Range("K" & z).Value = Range("J" & z).Value + Range("K" & z -
1).Value

Else
Range("K" & z).Value = Range("J" & z).Value

End If
z = z + 1
Loop


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

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