A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Concatenate by checking a condition



 
 
Thread Tools Display Modes
  #1  
Old December 4th, 2008, 11:32 PM posted to microsoft.public.excel.worksheet.functions
senthil
external usenet poster
 
Posts: 24
Default Concatenate by checking a condition

Hi,

I am trying to concatenate cells after checking the condition. For example

A B
1 0
1 A
1 B
2 0
2 1
2 B

I would like to check the value of A and concatenate B. For A = 1, I am
looking for 0 A B. For A = 2, I am looking for 0 1 B.

Is there a function to do it automatic?

Thanks
  #2  
Old December 4th, 2008, 11:47 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Concatenate by checking a condition

Nothing built in to do this. There is a free add-in that has a function that
will do this:

http://www.download.com/Morefunc/300...-10423159.html

Then you can use an array formula** like this:

=TRIM(MCONCAT(IF(A1:A6=1,B1:B6&" ","")))

Note that the resulting string can't be longer than 255 characters.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Senthil" wrote in message
...
Hi,

I am trying to concatenate cells after checking the condition. For example

A B
1 0
1 A
1 B
2 0
2 1
2 B

I would like to check the value of A and concatenate B. For A = 1, I am
looking for 0 A B. For A = 2, I am looking for 0 1 B.

Is there a function to do it automatic?

Thanks



  #3  
Old December 5th, 2008, 02:52 PM posted to microsoft.public.excel.worksheet.functions
senthil
external usenet poster
 
Posts: 24
Default Concatenate by checking a condition

Valko, Thanks for your help. I installed the add-in function that you have
suggested, I am getting the error message "#NAME?". I couldn't quite
understand what to do with array formula? Can you please help.
Thanks.

"T. Valko" wrote:

Nothing built in to do this. There is a free add-in that has a function that
will do this:

http://www.download.com/Morefunc/300...-10423159.html

Then you can use an array formula** like this:

=TRIM(MCONCAT(IF(A1:A6=1,B1:B6&" ","")))

Note that the resulting string can't be longer than 255 characters.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Senthil" wrote in message
...
Hi,

I am trying to concatenate cells after checking the condition. For example

A B
1 0
1 A
1 B
2 0
2 1
2 B

I would like to check the value of A and concatenate B. For A = 1, I am
looking for 0 A B. For A = 2, I am looking for 0 1 B.

Is there a function to do it automatic?

Thanks




  #4  
Old December 5th, 2008, 03:21 PM posted to microsoft.public.excel.worksheet.functions
senthil
external usenet poster
 
Posts: 24
Default Concatenate by checking a condition

Valko, I had to restart my m/c after the download installation. It works
pretty good.

Thank you.

"T. Valko" wrote:

Nothing built in to do this. There is a free add-in that has a function that
will do this:

http://www.download.com/Morefunc/300...-10423159.html

Then you can use an array formula** like this:

=TRIM(MCONCAT(IF(A1:A6=1,B1:B6&" ","")))

Note that the resulting string can't be longer than 255 characters.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Senthil" wrote in message
...
Hi,

I am trying to concatenate cells after checking the condition. For example

A B
1 0
1 A
1 B
2 0
2 1
2 B

I would like to check the value of A and concatenate B. For A = 1, I am
looking for 0 A B. For A = 2, I am looking for 0 1 B.

Is there a function to do it automatic?

Thanks




  #5  
Old December 5th, 2008, 07:19 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Concatenate by checking a condition

Good deal. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Senthil" wrote in message
news
Valko, I had to restart my m/c after the download installation. It works
pretty good.

Thank you.

"T. Valko" wrote:

Nothing built in to do this. There is a free add-in that has a function
that
will do this:

http://www.download.com/Morefunc/300...-10423159.html

Then you can use an array formula** like this:

=TRIM(MCONCAT(IF(A1:A6=1,B1:B6&" ","")))

Note that the resulting string can't be longer than 255 characters.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Senthil" wrote in message
...
Hi,

I am trying to concatenate cells after checking the condition. For
example

A B
1 0
1 A
1 B
2 0
2 1
2 B

I would like to check the value of A and concatenate B. For A = 1, I am
looking for 0 A B. For A = 2, I am looking for 0 1 B.

Is there a function to do it automatic?

Thanks






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:26 PM.


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