![]() |
|
#11
|
||||
|
||||
|
Charles is right, EC: I'm used to writing in another language that allows concatenations merely by sticking variables and constants next to each other (eg
Code:
"A"jr":L"jr Code:
"A" & jr & ":L" & jr Oh, wait, I have a better excuse than I remembered: Two of my sons showed up unannounced to take me out to a sports bar and watch the first US game (against Ghana) in the World Cup for my 60th birthday. So I was sort of in a hurry to finish my response and send it to you. The US won, too! Still, I apologize. To make it up to you, I have tested the remaining program, even though it's 'way past my bedtime (sigh, moan, and a surreptitious glance to see whether I'm making an impression) and watched it work for real. I ran it straight off the sample you sent, and therefore some parts had to be changed to match the current columns, so it looks like this: Code:
Sub Main()
'Range("E:E,G:G,J:J").Delete Shift:=xlToLeft
For jr = 2 To 264
Set org = Range("A" & jr & ":O" & jr).Interior
Select Case Range("O" & jr).Value
Case "Phase"
org.ThemeColor = xlThemeColorLight2
org.TintAndShade = 0.799981688894314
Case "Sub-Phase"
org.ThemeColor = xlThemeColorDark1
org.TintAndShade = -4.99893185216834E-02
Case Else
End Select
Next jr
End Sub
And if it works this time, the next task is to teach the program to find the last row, so you don't have to make it run from 2 to 264 but can make it smarter. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Formatting contents after Tab of continuous lines or formatting specific area of word | pawii | Word | 1 | 05-12-2014 05:24 AM |
| macros | stebrownsword | Word VBA | 0 | 08-28-2013 01:16 AM |
How to do Formatting Using Macros
|
anju16saini | Word VBA | 1 | 03-11-2013 04:15 AM |
Formatting with macros
|
WaltR | Word VBA | 8 | 05-15-2012 06:28 PM |
| Macros | nore | Outlook | 0 | 06-01-2011 04:39 PM |