|
|
> And this stuff isn't really documented anywhere.
Rubbish!
Try looking up "range" or "cells" or "worksheet" in the object browser and
reading the help. It even gives examples, like (these are from the help on
the "range" keyword, the others are similar):
Worksheets("Sheet1").Range("A5").Value =
Worksheets("Sheet1").Range("A1").Value
Worksheets("Sheet1").Activate
Range("A1:H8").Formula = "=Rand()" 'Range is on the active sheet
Worksheets(1).Cells(1, 1).Value = 24
ActiveSheet.Cells(2, 1).Formula = "=Sum(B1:B5)"
How could it be any more clear what to do? Or, as Gilles said, record a
macro and then look at the code (and the help related to the code
generated) - a nice trick for learning how to do lots of things in Excel
(like creating charts, changing borders, sorting etc).
Post a reply to this message
|
|