Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ExcelMonkey
 
Posts: n/a
Default Conditional Concatenate

Sorry, I originally posted this in wrong discussion group (programming). I
would like to do this using existing Excel functions (non UDF).

Can anybody tell me how to do a conditional concatenate. I have to columns
of data. Column A has numbers: 1-5 (A2:A6). Column B has booleans:
TRUE/FALSE (B2:B6)

A B
1 TRUE
2 FALSE
3 TRUE
4 FALSE
5 TRUE

in B7 I want to do an conditional concatenate using "&" character on column
A using the booleans in column B. The result would like like this: &1&3&5.
Note there is a "&" before the first number as well.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Conditional Concatenate

Responses in programming.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ExcelMonkey" wrote in message
...
Sorry, I originally posted this in wrong discussion group (programming).

I
would like to do this using existing Excel functions (non UDF).

Can anybody tell me how to do a conditional concatenate. I have to

columns
of data. Column A has numbers: 1-5 (A2:A6). Column B has booleans:
TRUE/FALSE (B2:B6)

A B
1 TRUE
2 FALSE
3 TRUE
4 FALSE
5 TRUE

in B7 I want to do an conditional concatenate using "&" character on

column
A using the booleans in column B. The result would like like this:

&1&3&5.
Note there is a "&" before the first number as well.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default Conditional Concatenate

Hi,

Please try the following

First of all kindly arrange your data in range A1:B6 instead of A2:B6.

In cell D7, enter TRUE. In cell E7, enter the following array formula
(Ctrl+Shift+Enter)

=IF(ISERROR(INDEX($D$1:$E$5,SMALL(IF($E$1:$E$5=$D$ 7,ROW($E$1:$E$5)),ROW(1:1)),1)),"",INDEX($D$1:$E$5 ,SMALL(IF($E$1:$E$5=$D$7,ROW($E$1:$E$5)),ROW(1:1)) ,1))

Copy this down

In cell E11, enter the following formula

E7&E8&E9

Hope this solves your problem. If you have any further queries, please feel
free to contact me at



Regards

"ExcelMonkey" wrote:

Sorry, I originally posted this in wrong discussion group (programming). I
would like to do this using existing Excel functions (non UDF).

Can anybody tell me how to do a conditional concatenate. I have to columns
of data. Column A has numbers: 1-5 (A2:A6). Column B has booleans:
TRUE/FALSE (B2:B6)

A B
1 TRUE
2 FALSE
3 TRUE
4 FALSE
5 TRUE

in B7 I want to do an conditional concatenate using "&" character on column
A using the booleans in column B. The result would like like this: &1&3&5.
Note there is a "&" before the first number as well.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ExcelMonkey
 
Posts: n/a
Default Conditional Concatenate

When you say "copy this down", where do you mean to copy it down to?

Thanks

"Ashish Mathur" wrote:

Hi,

Please try the following

First of all kindly arrange your data in range A1:B6 instead of A2:B6.

In cell D7, enter TRUE. In cell E7, enter the following array formula
(Ctrl+Shift+Enter)

=IF(ISERROR(INDEX($D$1:$E$5,SMALL(IF($E$1:$E$5=$D$ 7,ROW($E$1:$E$5)),ROW(1:1)),1)),"",INDEX($D$1:$E$5 ,SMALL(IF($E$1:$E$5=$D$7,ROW($E$1:$E$5)),ROW(1:1)) ,1))

Copy this down

In cell E11, enter the following formula

E7&E8&E9

Hope this solves your problem. If you have any further queries, please feel
free to contact me at



Regards

"ExcelMonkey" wrote:

Sorry, I originally posted this in wrong discussion group (programming). I
would like to do this using existing Excel functions (non UDF).

Can anybody tell me how to do a conditional concatenate. I have to columns
of data. Column A has numbers: 1-5 (A2:A6). Column B has booleans:
TRUE/FALSE (B2:B6)

A B
1 TRUE
2 FALSE
3 TRUE
4 FALSE
5 TRUE

in B7 I want to do an conditional concatenate using "&" character on column
A using the booleans in column B. The result would like like this: &1&3&5.
Note there is a "&" before the first number as well.

Thanks

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
Keeping conditional formatting when sorting Andrea A Excel Discussion (Misc queries) 0 April 4th 06 03:00 PM
Conditional Format Not Working KMH Excel Discussion (Misc queries) 0 December 22nd 05 05:32 PM
Conditional formula - language needed gamebird Excel Worksheet Functions 7 October 10th 05 11:48 PM
VLOOKUP & Conditional Formating Help. Excel'ed Failures Excel Discussion (Misc queries) 6 August 16th 05 04:46 PM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 10:11 AM.

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"