Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Calculated Column Using Loop

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Increasing the number calculated by for same column Nic Excel Discussion (Misc queries) 5 March 13th 07 03:20 PM
Sumproduct with calculated column Charles L. Snyder Excel Programming 6 January 25th 06 01:56 PM
Loop through column headers to search from column name and get cell range Pie Excel Programming 9 December 29th 05 12:17 AM
Can the sum of 1p + 3p be calculated in a column in Excel? WW Excel Discussion (Misc queries) 1 November 10th 05 08:47 AM
using a calculated column value within a range gvm Excel Programming 1 September 17th 05 02:02 PM


All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"