Formula

Alejandraoskan

Board Regular
Joined
Oct 16, 2002
Messages
92
How can I change the contents of another cell in a formula.

For example my formula is written in cell A1 but I need that the action of this formula changes the contents of cell C1 (for example)
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi - welcome to the board

Could you describe in more detail exactly what your problem is, what youare trying to achieve etc - the more specific your description, the more specific (=helpful) the answers you're likely to get!

paddy
 
Upvote 0
thank you,

My question is:

If I write a formula in A1 the result of it will be in A1 .

Is it possible to write a formula that return a value in another cell. I need a formula in A1 but I need that it return a value in A1 but also a value in C1 (for example) ---- is it possible?

I need a formula that does several things, not just return a value. kind of like a procedure in Pascal languages.

thanks
 
Upvote 0
Hope I'm not being too simplistic here, but with a formula in a1,

=A1

in C1 will return the result of the formula to C1 ?!?

On the assumption that this isn't what you mean, more details please...

paddy
 
Upvote 0
If you are asking if a formula can return a result in a cell other than the cell housing that formula, the answer is no.

If you are asking if that effect can be achieved in some way, the answer is yes, by using VBA.

If you are interested, please post specifics, such as what calculation(s) are taking place in what cell(s), the results of which will be mirrored in what other cell(s).
 
Upvote 0
It make sense what you say.

I am confusing myself thinking that C1 can be like a variable that you can read and write like in programing languages.

I was asking about that because I am trying to create a formula to create the following pattern of numbers in a colum.
1
1
1
1
3
3
3
3
2
2
2
2
4
4
4
4
1
1
1
1
.
.
it repeat itself

thanks
 
Upvote 0
I am interested in the solution involving VBA.

please disregard my previous respond.

Here is the problem that I have:
I have 3 columns with the following data:
and two fixed cells D1 and E1

ColumnA ColumnB ColumnC D1=1
D 1 E1=2
N 1
D 2
N 2
D 3
N 3
D 4
N 4
D 5
N 5
D 6
N 6
D 0
N 0
D 1
N 1
. .
. .
repeat itself

my problem is to fill column C based on the values of columns A and B and the values of cells D1 and E1.

here are the rules:

if A1=D the value of C1=D1
if A1=N the value of C1=E1
(=if(A1=D;C1=$D$1;C1=$E$1)

the problem is that the values in D1 and E1 must change depending on the values of column B and A, and also depending on the previous values that they had.

here are the rules
values in D1 and E1 change when:
the value of column A is a D and when the value in column B is a 5.
this formula show the conditions:
=IF(AND((B1=5),(A1="D")),1,0)

so if the previous condition is true
the following changes must be made to D1 and E1
the begining values are D1=1 and E1=2

D1 1-> 3 -> 2 -> 4 ->1
E1 2-> 4 -> 1 -> 3 ->2

the previous scheme shows how the values in D1 and E1 must change.
for example in D1 1 gets changed to 3, a 3 gets change to a 2 a to gets change to a 4 ..
and so on.

That is the problem ?
Thanks
 
Upvote 0

Forum statistics

Threads
1,202,987
Messages
6,052,928
Members
444,615
Latest member
bmwm3cj20

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