VBA to Conditionally Change Font Size

ryan.smoke

New Member
Joined
Mar 23, 2011
Messages
3
Hi there,

I don't have much experience with VBA, but I'd like to be able to change font size in a range of cells based on a number of if statements.

So what I have is a list of words and the number of occurrences in a selection of text sorted from greatest to least. I have weighted them by dividing the number of occurrences of each word by the maximum number of occurrences in the range (as shown in the screenshot below, D3:D12). I then have a separate range B16:B25 that pulls from the list, and I'd like to change the size of the font in each cell based on the weight of each term. For example, any term with a weight of 91-100% I'd like to format the font to be Size 100, and for weights 81-90% I'd like to make Size 90, etc.

I'm working in Excel 2010 on Windows 7. Based on some other threads I've seen this doesn't seem like it would be terribly difficult, but I don't really have a clue when it comes to VBA. Any help would be greatly appreciated!

Click Here for a Screenshot
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,224,525
Messages
6,179,319
Members
452,905
Latest member
deadwings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top