![]() |
concatenate strings
I am using the CONCATENATE() function to combine two strings. For example,
"seek " is in A1 and "help" is in A2 and =CONCATENATE(A1,A2) returns "seek help". The concatenation loses the formatting of the original words. For example, if "help" is bold, the concatenated phrase does not preserve this. How can I preserve the font, etc? Should I be using something other than CONCATENATE()? B.T.W. The same thing is true of Text to Columns. The text gets correctly separated, but the fonts get lost. -- Gary''s Student |
Your are only concatenating the values Gary, doesn't take formats as well.
For that you would need some complex code to determine what formats are applied, and it could apply them all anyway, such as cell colour, border. -- HTH Bob Phillips "Gary''s Student" wrote in message ... I am using the CONCATENATE() function to combine two strings. For example, "seek " is in A1 and "help" is in A2 and =CONCATENATE(A1,A2) returns "seek help". The concatenation loses the formatting of the original words. For example, if "help" is bold, the concatenated phrase does not preserve this. How can I preserve the font, etc? Should I be using something other than CONCATENATE()? B.T.W. The same thing is true of Text to Columns. The text gets correctly separated, but the fonts get lost. -- Gary''s Student |
Thanks Bob:
From this and your response yesterday, I realize I need to build myself some general tools to split/merge text taking font characteristics into account. Probably character by character. I'll start with the code you posted yesterday. Thanks again and have a good day. -- Gary''s Student "Bob Phillips" wrote: Your are only concatenating the values Gary, doesn't take formats as well. For that you would need some complex code to determine what formats are applied, and it could apply them all anyway, such as cell colour, border. -- HTH Bob Phillips "Gary''s Student" wrote in message ... I am using the CONCATENATE() function to combine two strings. For example, "seek " is in A1 and "help" is in A2 and =CONCATENATE(A1,A2) returns "seek help". The concatenation loses the formatting of the original words. For example, if "help" is bold, the concatenated phrase does not preserve this. How can I preserve the font, etc? Should I be using something other than CONCATENATE()? B.T.W. The same thing is true of Text to Columns. The text gets correctly separated, but the fonts get lost. -- Gary''s Student |
This one is trickier though as it can't be a UDF, as a UDF cannot set
attributes of a cell, just returns a value. So it would have to be event code, and as I intimated, there are many formats you will have to test for, and then as you say, apply by characters. Not simple IMO. Regards Bob "Gary''s Student" wrote in message ... Thanks Bob: From this and your response yesterday, I realize I need to build myself some general tools to split/merge text taking font characteristics into account. Probably character by character. I'll start with the code you posted yesterday. Thanks again and have a good day. -- Gary''s Student "Bob Phillips" wrote: Your are only concatenating the values Gary, doesn't take formats as well. For that you would need some complex code to determine what formats are applied, and it could apply them all anyway, such as cell colour, border. -- HTH Bob Phillips "Gary''s Student" wrote in message ... I am using the CONCATENATE() function to combine two strings. For example, "seek " is in A1 and "help" is in A2 and =CONCATENATE(A1,A2) returns "seek help". The concatenation loses the formatting of the original words. For example, if "help" is bold, the concatenated phrase does not preserve this. How can I preserve the font, etc? Should I be using something other than CONCATENATE()? B.T.W. The same thing is true of Text to Columns. The text gets correctly separated, but the fonts get lost. -- Gary''s Student |
All times are GMT +1. The time now is 10:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com