![]() |
Script to increase font size of cells
In Col A starting at cell A1 to A42 I have the numbers (years) 1963 to
2005. I want to run a macro that will start at the beginning and assign a font size of 1 to A1 and then 2 to A2 and so on until cell A42 where it finishes with a font size of 42. Can anyone help? TIA, Alan |
Script to increase font size of cells
Alan,
I can only get years: 1963 to 2004 in 42 rows. The code does provide an interesting effect... '---------------------- Sub StepUpFont() 'Jim Cone - San Francisco, USA - 11/05/2005 Dim rngCell As Excel.Range Dim lngFont As Long For Each rngCell In Range("A1:A42") lngFont = lngFont + 1 rngCell.Font.Size = lngFont Next 'rngCell Set rngCell = Nothing End Sub '------------------ "Alan" wrote in message 42 In Col A starting at cell A1 to A42 I have the numbers (years) 1963 to 2005. I want to run a macro that will start at the beginning and assign a font size of 1 to A1 and then 2 to A2 and so on until cell A42 where it finishes with a font size of 42. Can anyone help? TIA, Alan |
Script to increase font size of cells
Hello Alan, Here is an example... Code: -------------------- Sub FontSizes() Dim R as Long For R = 1 To 42 Cells(R, "A").Font.Size = R Next R End Sub -------------------- Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=482560 |
All times are GMT +1. The time now is 05:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com