Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Excel text formatting within a function

Status
Not open for further replies.

bigkeith

IS-IT--Management
Jul 27, 2001
36
GB
Hello all,
I have written an IF function in excel and would like some control over the resulting text display. The function checks to see if a number has been entered in one cell before performing a calculation. If no number has been entered, then a text message is displayed in the cell. Is it possible to alter the format of the resulting text, eg change the colour or make it bold? Here is an example of the function:

=IF(ISNUMBER(I3),(M3/1000)*(I3-J3),"Coil Weight?")


I was hoping to add a character code to the text, eg
chr(nn)&"Coil Weight" - where nn would be the corect code for Bold.

Am I barking up the wrong tree - or just barking?

Thanks in advance

Keith
 
Set the conditional Formatting for that cell to become bold (or whichever format you want) if the cell's Value = "Coil Weight"



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
You cant change a cells format using a function! You have to go to Format->Conditional Formatting... and set the format you want the cell to have if it's value is equal to your criteria. You can set up to three criteria. If you need more, then you will (more than likely) have to go the VBA route.

I hope this helps!

Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Thanks Mike, that does the trick perfectly.

Keith
 
Glad I could help! [wavey]



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top