Solved how to bold text in an excel formula

September 20, 2019 at 18:07:55
Specs: Windows 7
Cell A1 (Elaun Lebih Masa yang jumlahnya)
Cell B1 (melebihi 1/3)
Cell C1 (daripada gaji bulanannya.)

Formula =A1&B1&C1 => Elaun Lebih Masa yang jumlahnya melebihi 1/3 daripada gaji bulanannya.

I want to BOLD cell B1 (melebihi 1/3) only


See More: how to bold text in an excel formula

Reply ↓  Report •

#1
September 20, 2019 at 23:47:18
The only way to accomplish what you want is with a VBA Macro
and unfortunately my VBA skills are not up to the task.

MIKE

http://www.skeptic.com/


Reply ↓  Report •

#2
September 23, 2019 at 06:43:26
✔ Best Answer
First, a posting tip:

Please click on the How-To link at the end of this post and read the instructions on how to format example data so that it is easier for us to read. Then edit/repost your data so that the columns line up correctly. Don't forget to use Column letters and Row numbers as shown in the example.

I think this is what you have:

                 A                           B                       C
1   Elaun Lebih Masa yang jumlahnya      melebihi 1/3     daripada gaji bulanannya.

If that is the case, then =A1&B1&C1 may not return what you have posted. Without spaces in either the cells or the formula, that formula may return this:

Elaun Lebih Masa yang jumlahnyamelebihi 1/3daripada gaji bulanannya.

Please clarify exactly what you have in the cells (do they contain leading or trailing spaces?) or update your formula so that we know what data we are working with.

If you don't have spaces in the cells, you'll need this:

=A1&" "&B1&" "&C1

Thanks!

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code


Reply ↓  Report •

#3
September 24, 2019 at 12:37:51
You cannot bold text in cell that contains a formula because it doesn't really contain that text string, it merely displays it.

A macro would first need to replace the formula with the actual string then apply the desired formatting. If this is a one time thing, that's pretty easy.

If it's going to be an ongoing operation, with the string changing every now and then, things get a bit more complicated, but I think it can still be done. There would need to be code that replaces the formula when B1 changes so that the destination cell gets updated before the formatting is applied.

Before I put any work into this, please give us a few more details related to how this worksheet is used, if the string will change, etc.

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code

message edited by DerbyDad03


Reply ↓  Report •
Related Solutions


Ask Question