View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier[_3_] Roger Govier[_3_] is offline
external usenet poster
 
Posts: 2,480
Default concatenate "if"

Hi

The following formula entered into D4 and copied down, would satisfy your
criteria based upon the sample shown.

I'm not sure that it would work for all of your cases, however, as it would
depend upon the number of products for each company.
=IF(C4<0,"",IF(AND(C2=1,C3=1),
F2&", "&F3&", "&F4,
IF(C3=1,F3&", "&F4,IF(C3=0,F4,""))))
--
Regards
Roger Govier



"Golfking" wrote in message
...
I am trying to concatenate a range of cells based on a condition. It would
be nice to have a function = concatenate if(Range, Criteria, Concatenate
Range)

Here is an example of the sheet1.

1 Column E=IF (F2=F3,1,0) Column F ........ Column
J
2 1 ABC Corp 85252
Product A
3 1 ABC Corp 85252
Product B
4 0 ABC Corp 85252
Product F
5 1 BCD Inc.
Product B
6 0 BCD Inc.
Product K
7 0 FJK Company
Product A
8 1 LMN Inc.
Product A
9 1 LMN Inc.
Product B
10 0 LMN Inc.
Product C

I'd like the resultant to show up in the row that has the last of the
company names which has the 0 in it in column D. So in D4 the result
would
be "Product A, Product B, Product F" in D6 the result would be "Product
B,
Product K" and so on.

Does this make sense?