+ Reply to Thread
Results 1 to 6 of 6

'Conditional Formatting' CODE to change Font Size

  1. #1
    Forum Contributor
    Join Date
    10-30-2010
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    100

    'Conditional Formatting' CODE to change Font Size

    Hi I have an invoice that has a list of items on all the time and I want to have the font size for the columns qty, item, price, and total to change larger when there is a value in the qty field. I attached a sample. Wish conditional formatting would do it but I guess it can't mess with column and row widths.

    Thanks in advance!
    Attached Files Attached Files
    Last edited by trickyricky; 03-26-2011 at 09:39 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Need help on 'Conditional Formatting' CODE to change Font Size

    Quote Originally Posted by trickyricky View Post
    I attached a sample.
    Missing attachment....
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    10-30-2010
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    100

    Re: Need help on 'Conditional Formatting' CODE to change Font Size

    haha sorry.. forgot to upload it

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Need help on 'Conditional Formatting' CODE to change Font Size

    Conditional formatting can make text bold but it won't let you change font face or size. See attached for a solution for bold.

    See second version for a VBA solution that does what you need.

  5. #5
    Forum Contributor
    Join Date
    10-30-2010
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    100

    Re: Need help on 'Conditional Formatting' CODE to change Font Size

    Hey thanks! Works excellent!

    Could you also show me the code to set it up as a Macro so I could click a button if I wanted to?

    I appreciate it!

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: 'Conditional Formatting' CODE to change Font Size

    I don't think it will do any good to associate it with a button. It detects when the quantity is updated and modifies the format of that particular row; it doesn't reevaluate the entire list. You can see the code if you hit ALT-F11 and click on Sheet1.

    For some reason it wasn't doing what I thought; here is a revision to the same code
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1