|
|
От: |
Elena_
|
|
| Дата: | 02.08.04 11:03 | ||
| Оценка: | |||
TGU>Function GetFormula(FirstRange,SecondRange as Range) AS String
TGU> GetFormula="="& ???? &"/"& ????
TGU>End Function
TGU>
TGU>ActiveWorksheet.Cells(1,3).Formula=GetFormula(ActiveWorksheet.Cells(1,1),ActiveWorksheet.Cells(1,2))
TGU>'т.е. Мы делим ячейку А1 на А2 и в ячейки А3 должна быть формула "=A1/A2"
TGU>Address property as it applies to the Range object.
Returns the range reference in the language of the macro. Read-only String.
expression.Address(RowAbsolute, ColumnAbsolute, ReferenceStyle, External, RelativeTo)
...
Example
The following example displays four different representations of the same cell address on Sheet1. The comments in the example are the addresses that will be displayed in the message boxes.
Set mc = Worksheets("Sheet1").Cells(1, 1) MsgBox mc.Address() ' $A$1 MsgBox mc.Address(RowAbsolute:=False) ' $A1 MsgBox mc.Address(ReferenceStyle:=xlR1C1) ' R1C1 MsgBox mc.Address(ReferenceStyle:=xlR1C1, _ RowAbsolute:=False, _ ColumnAbsolute:=False, _ RelativeTo:=Worksheets(1).Cells(3, 3)) ' R[-2]C[-2]