formatting excel sheet

dinger

New member
Local time
Yesterday, 20:24
Joined
Sep 13, 2005
Messages
6
Hello,
This may be a stupid question, but is it possible to put multiple ranges in a range statment?
for instance, I am using the code:
with xlsheet
.range("A1").font.bold = true
.range("D4").font.bold = true
.range("L9").font.bold = true
....etc.

Is there a way to combine these three lines to one, being that I am applying the same formatting?

Thanks for any help
 
Hi,
Try this...

range("A1,D4,L9").font.bold = true

You can do this too...

range("A1:A5,D4:E4,L9:L13").font.bold = true

As long as you seperate your ranges with commas you should be OK.

Take Care.
 

Users who are viewing this thread

Back
Top Bottom