#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default SUMIF for texts

Could anyone help me with this?

I want to create a reference on text (like a SUMIF, but for text)

input: different persons get "x" on CL01, CL02,...
output via formula: OP1,OP2,OP3 listing the column with "x"

A B C D H I J
1 CL01 CL02 CL03 OP1 OP2 OP3
2 John x CL01 - -
3 Hugues x x CL02 CL03 -

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default SUMIF for texts

On Aug 19, 9:16 am, Pieter wrote:
Could anyone help me with this?

I want to create a reference on text (like a SUMIF, but for text)

input: different persons get "x" on CL01, CL02,...
output via formula: OP1,OP2,OP3 listing the column with "x"

A B C D H I J
1 CL01 CL02 CL03 OP1 OP2 OP3
2 John x CL01 - -
3 Hugues x x CL02 CL03 -


Well, simple text references are just like value references, like
"=A1". But if your data is as simple as you've shown, maybe, in H2:
IF(B2="x",B$1,"-")

Copy across and down. But if the database is more complex, you may
want something trickier, like an OFFSET function inside the IF.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default SUMIF for texts

On Tue, 19 Aug 2008 07:16:15 -0700, Pieter
wrote:

Could anyone help me with this?

I want to create a reference on text (like a SUMIF, but for text)

input: different persons get "x" on CL01, CL02,...
output via formula: OP1,OP2,OP3 listing the column with "x"

A B C D H I J
1 CL01 CL02 CL03 OP1 OP2 OP3
2 John x CL01 - -
3 Hugues x x CL02 CL03 -


If your data is limited to 3 columns (B to D) you can try the
following formulas:

In cell H2:
=IF(SUMPRODUCT(--(B2:D2="x"))=0,"-",INDEX(B$1:D$1,MATCH("x",B2:D2,0)))

In cell I2:
=CHOOSE(SUMPRODUCT(--(B2:D2="x"))+1,"-","-",CHOOSE(SUMPRODUCT(--(B2:D2=""),COLUMN(B:D)-COLUMN(A:A)),D$1,D$1,C$1),C$1)

In cell J2:
=IF(SUMPRODUCT(--(B2:D2="x"))=3,D$1,"-")

Copy the three cells H2:J2 down as far as you have rows in your data
table

For the general case, with more than 3 columns, something more clever,
probably including array formulas, have to be found.

Hope this helps / Lars-Åke
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default Array formula needed

Thanks Lars for your question. However I am not sure this going to solve my
problem.

My range is going from CL01 to CL45. So I think an array formula would be
helpful.

* The output (OP1, OP2, OP3) is a maximum of 3 choices.
* To make it more difficult: if I also want to put "y" in my input table,
and a new output for these "y": OPY1, OPY2, OPY3...

Can anyone help me with this?

"Lars-Ã…ke Aspelin" wrote:

On Tue, 19 Aug 2008 07:16:15 -0700, Pieter
wrote:

Could anyone help me with this?

I want to create a reference on text (like a SUMIF, but for text)

input: different persons get "x" on CL01, CL02,...
output via formula: OP1,OP2,OP3 listing the column with "x"

A B C D H I J
1 CL01 CL02 CL03 OP1 OP2 OP3
2 John x CL01 - -
3 Hugues x x CL02 CL03 -


If your data is limited to 3 columns (B to D) you can try the
following formulas:

In cell H2:
=IF(SUMPRODUCT(--(B2:D2="x"))=0,"-",INDEX(B$1:D$1,MATCH("x",B2:D2,0)))

In cell I2:
=CHOOSE(SUMPRODUCT(--(B2:D2="x"))+1,"-","-",CHOOSE(SUMPRODUCT(--(B2:D2=""),COLUMN(B:D)-COLUMN(A:A)),D$1,D$1,C$1),C$1)

In cell J2:
=IF(SUMPRODUCT(--(B2:D2="x"))=3,D$1,"-")

Copy the three cells H2:J2 down as far as you have rows in your data
table

For the general case, with more than 3 columns, something more clever,
probably including array formulas, have to be found.

Hope this helps / Lars-Ã…ke

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
SUMIF or SUMPRODUCT to total cells containing multiple texts Terranoman Excel Worksheet Functions 31 October 12th 06 08:14 AM
Concatenation 2 Texts Hi_no_Tori Excel Discussion (Misc queries) 8 September 21st 06 06:16 AM
sumif function when left 4 texts are matching Vikram Dhemare Excel Discussion (Misc queries) 1 April 25th 06 08:27 AM
summing texts [email protected] Excel Discussion (Misc queries) 1 March 16th 06 06:35 AM
Using Texts in Cells Duncan Excel Discussion (Misc queries) 4 October 14th 05 11:26 AM


All times are GMT +1. The time now is 11:23 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"