Formula question

G

Guest

What's wrong with this formula?

=IF(A2=C2,(F2:G2),(H2:I2))

all columns referenced are numbers.
I'm trying to say if A2=C2 then insert F2-G2 columns
but if A2 doesn't = C2 then insert H2-I2 columns
 
J

JE McGimpsey

There's nothing wrong if you're array-entering it (using
CTRL-SHIFT-ENTER) into two adjacent cells.
 
G

Guest

I'm not sure what your trying to do but the answer to your question is that
your formula doesn't do anything if A2=C2 is true or false because (F2:G2)
isn't actually an instruction to do anything. You might try:-

=IF(A2=C2,SUM(F2:G2),SUM(H2:I2))

Mike
 
G

Guest

what I want to do is combine F2 and G2 (separated with a comma) if A2 and C2
match
If A2 and C2 do not match I want to combine H2 and I2 (separated with a comma)

is that possible in Excell?
 
D

Dave Peterson

=IF(A2=C2,F2&","&G2),H2&","&I2)

joker_r_me said:
what I want to do is combine F2 and G2 (separated with a comma) if A2 and C2
match
If A2 and C2 do not match I want to combine H2 and I2 (separated with a comma)

is that possible in Excell?
 

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