Conditional statements: how do I make reslts show up in dif cell

G

Guest

I am setting up multiple conditional statements. In the current one, I am
typing information (the conditional statement) into a cell, but rather than
the results show up in that cell, I want the results to show up in
different/multiple cells. For instance. I am inputting information into ER17.
The statement I am writing is "=IF(EG17="20214",
(EN17=EG20,EO17=EH20,EP17=EI20,EQ17=EJ20), "")" where the cell references on
the right side of the "=" contain information; those cell references to the
left of the "=" is where I want the information/result to show up. How do I
do this? Please advise right away. Thanks.
 
G

Guest

If you're trying to set these various cells to values contained in other
cells, you need to write separate formulas for each cell. Example: in EN17
you need to write =EG20, and so on. Trying to write an IF-THEN-ELSE
statement is not going to get you anywhere.

Dave
 
G

Guest

A formula will only return a value to the cell it is in. It cannont send
values to other cells. If you want values in other cells, then those other
cells must each contain a formula of their own.

In your example, put this formula into cell EN17:

=IF(EG17="20214",EG20,"")

And then in EO17 put this formula:

=IF(EG17="20214",EH20,"")

etc, etc....

HTH,
Elkar
 
G

Gord Dibben

Formulas can only "pull" data into the cell in which the formula is written.

They cannot "send" data to other cells.

In EN17 enter =IF($EG$17="20214",EG20,"")

Drag/copy across to EQ17


Gord Dibben MS Excel MVP
 
P

plb2862

achieve said:
I am setting up multiple conditional statements. In the current one, I am
typing information (the conditional statement) into a cell, but rather
than
the results show up in that cell, I want the results to show up in
different/multiple cells. For instance. I am inputting information into
ER17.
The statement I am writing is "=IF(EG17="20214",
(EN17=EG20,EO17=EH20,EP17=EI20,EQ17=EJ20), "")" where the cell references
on
the right side of the "=" contain information; those cell references to
the
left of the "=" is where I want the information/result to show up. How do
I
do this? Please advise right away. Thanks.
You'll need to write a VBA code like:
IF condition THEN
action1
action2
Else
action4
End IF
Try posing the question to the microsoft.public.excel.programming group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top