LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Create sum formula when using index column/row references

I've got a program that I've created in Excel using VBA. I'm creating some
calculations from sheets that are imported from elsewhere. I'm needing to
create a sum formula on the worksheet. The column and row reference for
where this formula will be placed will differ by worksheet. I'm using some
variables like mCol and mRow to keep track of which column and row I'm doing
stuff on. These variables are tracking the column and row reference by index
number, not by the letter identifier of the column.

Now, I'm at the point where I'm having to place a sum function in a cell,
except that I need the sum function to add up all of the cells above it. So,
for example, if the sum formula goes into C25, I want it to place a formula
that will go into cell C25, something like sum(c1:c24). But I'm using index
numbers instead of column letters to track which column I'm doing this in.
So, mCol = 3 and mRow = 25.

I can't figure out how to construct the sum formula using my index variables.


 
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
How do I create a formula that references a specific tab in Excel? fberg Excel Worksheet Functions 1 March 14th 09 01:53 PM
Creating a formula that references the last value of a column conny Excel Discussion (Misc queries) 10 June 25th 07 01:12 AM
Creating a formula that references the last value of a column conny Excel Worksheet Functions 1 June 24th 07 09:40 PM
copy formula down a column and have cell references change within formula brad New Users to Excel 5 May 13th 07 04:38 PM
Vlookup - column index number - create as variable john young Excel Programming 2 August 6th 04 02:53 AM


All times are GMT +1. The time now is 08:56 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"