Pointing to cells i cells back, thus returning contents

Mikexcel

New Member
Joined
Sep 15, 2002
Messages
5
I am working on an excel template. I want to eventually add columns BEFORE my cumulative column. I want to set it up so that my cumulative column updates certain text automatically after I insert columns. Basically, I want to know if there is a way to point to cells i places away from the cells that are calling the function, and are getting a return. Here is an example of what I am trying to do: I have a cumulative colunm that iteratively says June - August. When I insert extra columns before the cumulative column, I want this cell that says June - August, to say June - September automatically. Since I will update the cell that is say i=3 places before the cumulative cell and populate it with the text September. Programatically, this is simply done with a for loop, but it seems that excel provides no for loop function. A for loop would do it this way (psuedo code):

CONST CELLS_AWAY = 3;//or whatever
for (int i=1;i<=CELLS_AWAY; i++){
if (cell.contents != " ")
return cell.contents;
break;
}
This message was edited by Mikexcel on 2002-09-16 11:33
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome to the BOard Michael,

not sure what's up....

you can reply again with a full excel problem : just hit "reply" and type away

lots of people here to help out so go for it

:)
 
Upvote 0
sorry - i updated my original post. my mistake - please read the following update:

I am working on an excel template. I want to eventually add columns BEFORE my cumulative column. I want to set it up so that my cumulative column updates certain text automatically after I insert columns. Basically, I want to know if there is a way to point to cells i places away from the cells that are calling the function, and are getting a return. Here is an example of what I am trying to do: I have a cumulative colunm that iteratively says June - August. When I insert extra columns before the cumulative column, I want this cell that says June - August, to say June - September automatically. Since I will update the cell that is say i=3 places before the cumulative cell and populate it with the text September. Programatically, this is simply done with a for loop, but it seems that excel provides no for loop function. A for loop would do it this way (psuedo code):

CONST CELLS_AWAY = 3;//or whatever
for (int i=1;i<=CELLS_AWAY; i++){
if (cell.contents != " ")
return cell.contents;
break;
}
 
Upvote 0

Forum statistics

Threads
1,215,198
Messages
6,123,589
Members
449,109
Latest member
Sebas8956

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top