ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formatting a formula (https://www.excelbanter.com/excel-worksheet-functions/250891-formatting-formula.html)

ALEX

Formatting a formula
 
This is probably not possible, but I figure there's not harm in asking.

I know that if I have a cell containing "apples and oranges" and I highlight
"apples" and click the bold button, only "apples" will be in bold face and
"oranges" will stay regular. Is it possible to do this with a formula. What I
mean is this:

A1="apples "
A2="and oranges"
A3=A1&A2

Is there any way that in A3 only "apples" be in bold face?

Alex

Gord Dibben

Formatting a formula
 
Not by using a formula.


Gord Dibben MS Excel MVP

On Sat, 12 Dec 2009 16:40:01 -0800, Alex
wrote:

This is probably not possible, but I figure there's not harm in asking.

I know that if I have a cell containing "apples and oranges" and I highlight
"apples" and click the bold button, only "apples" will be in bold face and
"oranges" will stay regular. Is it possible to do this with a formula. What I
mean is this:

A1="apples "
A2="and oranges"
A3=A1&A2

Is there any way that in A3 only "apples" be in bold face?

Alex



Dave Peterson

Formatting a formula
 
Formulas don't allow this kind of character by character formatting.

You could convert it to values and do the formatting, though.

Alex wrote:

This is probably not possible, but I figure there's not harm in asking.

I know that if I have a cell containing "apples and oranges" and I highlight
"apples" and click the bold button, only "apples" will be in bold face and
"oranges" will stay regular. Is it possible to do this with a formula. What I
mean is this:

A1="apples "
A2="and oranges"
A3=A1&A2

Is there any way that in A3 only "apples" be in bold face?

Alex


--

Dave Peterson

FSt1

Formatting a formula
 
hi
this type of formating can only be done for text.
it can't be done for true numbers or formulas.
it can be done for numbers formated as text.

Regards
FSt1



"Alex" wrote:

This is probably not possible, but I figure there's not harm in asking.

I know that if I have a cell containing "apples and oranges" and I highlight
"apples" and click the bold button, only "apples" will be in bold face and
"oranges" will stay regular. Is it possible to do this with a formula. What I
mean is this:

A1="apples "
A2="and oranges"
A3=A1&A2

Is there any way that in A3 only "apples" be in bold face?

Alex


Ron Rosenfeld

Formatting a formula
 
On Sat, 12 Dec 2009 16:40:01 -0800, Alex
wrote:

This is probably not possible, but I figure there's not harm in asking.

I know that if I have a cell containing "apples and oranges" and I highlight
"apples" and click the bold button, only "apples" will be in bold face and
"oranges" will stay regular. Is it possible to do this with a formula. What I
mean is this:

A1="apples "
A2="and oranges"
A3=A1&A2

Is there any way that in A3 only "apples" be in bold face?

Alex


To accomplish this, you could
Implement your formula in a VBA Macro
Have the VBA Macro output a text string to the cell
Format the text cell appropriately.

By using an event-triggered macro, you could almost emulate the functionality
of a formula.

Perhaps if you can be more specific as to your requirements ...
--ron

ALEX

Formatting a formula
 
Thanks to everyone for replying.

I hope I can accurately describe what I am trying to do: I have three sets
of data in three columns. Some cells in these columns have data, some are
empty. I also have an output cell that, based on the value of a combo box,
joins together and outputs the data contained in these columns into a single
cell. My ideal condition is that whenever data from column 1 exists, then
that data (and only that data) must stand out in some way (bold face,
different color, whatever). What I'm doing right now is using conditional
formatting to change the font of the whole output cell based on whether data
from column 1 exists or not. My problem with doing it this way is that the
emphasis is not where I would like it to be. I hope I wasn't too confusing :)

Thanks again,
Alex

"Ron Rosenfeld" wrote:
To accomplish this, you could
Implement your formula in a VBA Macro
Have the VBA Macro output a text string to the cell
Format the text cell appropriately.

By using an event-triggered macro, you could almost emulate the functionality
of a formula.

Perhaps if you can be more specific as to your requirements ...
--ron
.



All times are GMT +1. The time now is 05:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com