#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Formula question

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Formula question

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

In article ,
joker_r_me wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Formula question

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

"joker_r_me" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Formula question

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?
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Formula question

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

joker_r_me wrote:

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?


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Formula question

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

"Dave Peterson" wrote:

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

joker_r_me wrote:

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?


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Formula question

Thanks for the typo correction.

Mike wrote:

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

"Dave Peterson" wrote:

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

joker_r_me wrote:

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?


--

Dave Peterson


--

Dave Peterson
Reply
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
Formula Question metaltecks Excel Discussion (Misc queries) 3 December 6th 06 05:24 PM
formula question Problems with formula within worksheet Excel Discussion (Misc queries) 4 November 29th 06 12:25 AM
question on formula Cokeyb Excel Discussion (Misc queries) 2 June 22nd 06 08:08 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
Formula Question metaltecks Excel Discussion (Misc queries) 1 May 4th 06 06:02 PM


All times are GMT +1. The time now is 12:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"