?
Solved

Excel 2010:  Conditional Statement that Increases Font Size

Posted on 2013-01-31
6
Medium Priority
?
291 Views
Last Modified: 2013-02-04
I need to create a conditional statement that will increase the font size of the cells it finds the keyword in.

For example, I'd like to look for all words that match "(Subject)" if it finds it, it highlights that cell and boost the font up 2 or 3 pitch higher.  So if the font is presently at Arial 11, it would boost it up to Arial 13 or 14.  Is this possible?
0
Comment
Question by:itsmevic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 26

Expert Comment

by:redmondb
ID: 38842023
itsmevic,

I'm afraid not. However this could be done by a macro. If you want to go down that route then do you want the updating to happen automatically or only when you explicitly run the macro?

Thanks,
Brian.
0
 

Author Comment

by:itsmevic
ID: 38844484
Hi Brian, for my scenario it would be better if it were just ran manually when needed.
0
 
LVL 26

Accepted Solution

by:
redmondb earned 1000 total points
ID: 38844562
Sure,  itsmevic. Number of questions, please.

(1) Crucial question - what happens if the user runs the macro a second time? Is the font size size now 17? Alternatively, we can have two defined sizes - one for without string (say 11) and one for with (say 14).

(2) How do you want the cell to be highlighted?

(3) What range should be checked?

(4) Do you want each row's height changed to reflect its monitored cell's size?

(5) Is it possible that a string may have been added to the cell and subsequently removed? (So we need code to reduce font size also.)

Thanks,
Brian.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 14

Assisted Solution

by:Faustulus
Faustulus earned 1000 total points
ID: 38849362
Did you consider that changing the font size - in fact, even making it bold! - also changes the text width? The newly resized text may require more space which can either lead to incomplete display or automatic change of column width. Then, as Brian is pointing out, you may have to reverse the procedure.
For these reasons I have always abstained from implementing such ideas whenever they struck me as a good solution in the past. In fact, change of fore and back colors are powerful tools for drawing attention, and you can supplement them by making the font bold where the increase in size can be accommodated in the standard column width (just make it a little larger than necessary for non-bold type) if the words to be emboldened aren't too long.
0
 

Author Closing Comment

by:itsmevic
ID: 38852034
Thanks guys!  Makes sense, rather than change font size and risk how the value appears in the cell, I'll just stick to the background color and the indicator.  Thanks again!
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38852165
Thanks, itsmevic.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question