LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default VBA: For Count, when count changes from cell to cell

Hello,

I am trying to write a "simple" code to sum one value in a column
containing values of (Q3) and add it to another which is the calculated
value that I'm after (I3), in the column adjacent.. How many values of
Q3 that I sum depends on what another value, SP/2 is in the last
column.

A code I found in easy language looks like this:

For count= 0 to Int(SP/2) -1 begin
I3=I3 + Q3(Count)

My Excel 2000 spreadsheet looks like this:

Col: AF AG AH
(Q3) (I3) (SP/2)

.03
.02
.05
.04
.06 X 4
.07 X1 3
. . .
. . .
.01 Xn 6

I want to be able to calculate I3 for x, x1 and...... xn

How do I do this in VBA? Could you please also show me how you would
declare the variables as well. I am just starting out in this, and if
you could point me in the right direction I'd appreciate it.

Thanks
LS

 
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
Cell References [email protected] Excel Discussion (Misc queries) 2 November 15th 06 11:37 PM
Using an offset formula for the reference in a relative reference Cuda Excel Worksheet Functions 6 November 15th 06 05:12 PM
Count # of A's in a Cell JavyD Excel Worksheet Functions 0 February 6th 06 09:31 PM
Cell Count bombayterror New Users to Excel 2 January 21st 06 09:33 PM
Count on cell for each time it is changed Jelinek Excel Discussion (Misc queries) 3 January 9th 06 02:22 PM


All times are GMT +1. The time now is 08:12 PM.

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

About Us

"It's about Microsoft Excel"