ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calculated Column Using Loop (https://www.excelbanter.com/excel-programming/382669-calculated-column-using-loop.html)

[email protected]

Calculated Column Using Loop
 
How do you calculate a column using a loop?
A B C
1 100 200 ?
2 13 17 ?
..
..
..
N


Don Guillett

Calculated Column Using Loop
 
Perhaps you can give a better explanation? Is this homework?

--
Don Guillett
SalesAid Software

wrote in message
oups.com...
How do you calculate a column using a loop?
A B C
1 100 200 ?
2 13 17 ?
.
.
.
N




Tom Ogilvy

Calculated Column Using Loop
 
Sub CalcColumn()
Dim cell as Range
Dim rng as Range
set rng = range(cells(1,2),cells(1,2).End(xldown))
for each cell in rng
cell.offset(0,1).Value = cell.Value + cell.offset(0,-1).Value
Next
End Sub

--
Regards,
Tom Ogilvy


" wrote:

How do you calculate a column using a loop?
A B C
1 100 200 ?
2 13 17 ?
..
..
..
N



Mike

Calculated Column Using Loop
 
What answer would you like to have in C?

" wrote:

How do you calculate a column using a loop?
A B C
1 100 200 ?
2 13 17 ?
..
..
..
N




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

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