.


:




:

































 

 

 

 





1. (. 8), . 13

. 13.

2. ٸ (Excel 207 / 2010 /2013) (Excel 2003).

, . Excel ,

MS Excel 2003

MS Excel 2007 / 2010 /2013 (. 14) (. 15)

. 14. MS Excel 2010

. 15. MS Excel 2010

(16) . , . 13.

:

1. (. 16) (), .

.16.

2. Visual Basic (Excel 2003) Visual Basic, (Excel 2007 / 2010 / 2013).

3. ٸ Visual Basic.

.17 Excel2003

Excel2007 / 2010 / 2013:

.18 MS Excel2010

. , Excel .

Option Explicit

 
 


Sub ()

'

'

' 09.10.2015 (Neklyudova)

 

ActiveCell.FormulaR1C1 = " "

Range("A2").Select

ActiveCell.FormulaR1C1 = " "

Range("B2").Select

ActiveCell.FormulaR1C1 = " "

Range("C2").Select

ActiveCell.FormulaR1C1 = " "

Range("D2").Select

ActiveCell.FormulaR1C1 = ""

Range("E2").Select

ActiveCell.FormulaR1C1 = ""

Range("F2").Select

ActiveCell.FormulaR1C1 = ""

Range("F3").Select

End Sub

VBA . VBA , Range ( ) Select, FormulaR1C1 , , () R1C1 . , VBA Option Explicit, .

Excel :

1

2

3

4

, , , A1. . A1 , " " . A1 . Range("A1").Select, A1 .

Sub ()

'

'

' 09.10.2015 (Neklyudova)

 

Range("A1").Select

ActiveCell.FormulaR1C1 = " "

Range("A2").Select

ActiveCell.FormulaR1C1 = " "

Range("B2").Select

ActiveCell.FormulaR1C1 = " "

Range("C2").Select

ActiveCell.FormulaR1C1 = " "

Range("D2").Select

ActiveCell.FormulaR1C1 = ""

Range("E2").Select

ActiveCell.FormulaR1C1 = ""

Range("F2").Select

ActiveCell.FormulaR1C1 = ""

Range("F3").Select

End Sub

 
 


, , Excel, Range. Excel Range Worksheet ( ). Range VBA.

Range

, Range , . , Range (":C") , , B C, Range ("2: 2") .

Rows () Columns (), . , Columns(1), Rows(2).

Range.

Range:

Value . C1: = Range("C1").Value AI: 2 1: Range("A1:B2").Value = 1
Name . 1:2 : Range("Al:B2").Name =""
Count . , AI: 2: = Range("Al:B2").Rows.Count
CurrentRegion . , . , , A1: = Range("Al").CurrentRegion.Rows.Count
WrapText . True False. 2 " " (, ): With Range ("B2") .Value = " " .WrapText = True End With
EntireColumn, EntireRow . : ActiveCell.EntireRow.Clear ActiveCell.EntireColumn.Select
ColumnWidth, RowHeight .
Comment Comment (), . Comment Comments. AddComment, , . comment Text, , . : Text (Text, Start, Overwrite) : Text , ; Start . , ; Overwrite : True ( ) False ( ) Comment visible, , . , B3, (. 3.1): With Range("") .AddComment .Text Text:= " !" & Chr(10)&" !" .Visible = True End With
Font Font (). Font : Name , , "Arial Cyr" FontStyle , Regular (), Bold (), Italic(), Bold italic ( ) Size Strikethrough : True ( , ) False ( ) Superscript : True ( ) False ( ) Subscript : True ( ) False ( ) Underline : - xlNone ( ) - xlSingie (, ) - xlDoubie (, ) - xlSingleAccounting (, ) - Accounting (, ) A1: B2 , 14: With Range ("A1:B2").Font .Size = 14 .FontStyle = Bold .Colorlndex = 3 End With
Formula Al. , C2 =$$4+$$10: Range("C2").Formula = "=$$4+$$10"
FormulaArray 1. , <Enter>, <Ctrl>+<Shift>+<Enter>. 1: =Sum(Al:A3*Bl:B3): Range("El:E3").FormulaArray = "=Sum(Al:A3*Bl:B3)"
FormulaHidden : True ( , ) False ( ). , : Columns "A").FormulaHidden = True
FormulaLocal () 1. , 2 =(1:4): Range("B2").FormulaLocal = "=(1:4)"
FormulaRlCl R1C1. , Range("Bl"). FormulaRlCl = "=SQRT(R3C2)"
FormulaRlClLocal R1C1
Text
HorizontalAlignment . : xlceneral ( , ) xlcenter ( ) xlRight ( ) xlLeft ( ) xUustify ( ) xlCenterAcrossSelection ( ) xlFill (
Vertical Alignment . : xlBottom ( ), xlcenter ( ), xUustify ( ), xlTop ( )
Orientation . 90 90, : xlDownward ( , -90) xlHorizontal( , ) xlupward ( , 90) xlvertical ( , )
ShrinkToFit : True ( , ) False ( )

 

Range:

Address . : Address(rowAbsolute, coluimAbsolute, referenceStyle, external, relativeTo) : rowAbsoiute True False, True , columnAbsoiute True False, True , referenceStyle xlAl x1R1C1, x1A1 , 1, x1R1C1 R1C1 external True False, False , relativeTo , rowAbsoiute columnAbsoiute False, a referenceStyle x1R1C1, , . . $$1: MsgBox Cells(1, 1).Address() $1: MsgBox Cells(1,1).Address(rowAbsolute:=False) R1C1 MsgBox Cells(1,1).Address(ReferenceStyle:=x1R1C1)
Clear, ClearComments, ClearContents, ClearFormats, ClearNotes clear . Al: G37: Range("A1:G37").Clear ClearComments, ClearContents, ClearFormats ClearNotes , , .
AutoFit
Copy . : Copy(destination) destination , . destination , . A1: D4 1 5: 8 2: Worksheets("1").Range("1:D4"). destination:=Worksheets "2").Range "E5:H8")
Cut , : Cut(destination) destination , . destination , . A1: D4 1 : Worksheets("1").Range("1:D4").Cut
Delete . : Rows(3).Delete
Columns, Rows , . i j , : i = Selection.Columns.Count j = Selection.Rows.Count
Insert . 1: Worksheets("1").Rows(4).Insert
Offset , , . : Offset (rowOffset, columnOffset) : rowOffset , columnOffset , . , , : ActiveCell.Offset(rowOffset:=3, columnOffset:=-2).Activate
Select
PasteSpecial . : BasteSpecial (paste, operation, skipBlanks, transpose) : paste , . : - xlAll () - xl Formulas () - xlvaiues () - xlFormats () - xlNotes () - xlAllExceptBorders ( ) operation . : - xlNone () - xlAdd () - xlSubtract () - xlMultiply () - xlDivide () wskipBlanks : True ( ) False ( ) transpose True ( ) False ( ) C1:C5 1 D1: D5 , D1: D5, C1: 5: Worksheets("1").Range("1:5"). Worksheets("1").Range("D1:D5").PasteSpecial operation: =xlAdd PasteSpecial , (Edit, Paste Special). PasteSpecial (Paste Special), .
AddComment . : AddComment (Text) Text . "!" A1 : Range("!").AddComment "!"

 

Selection ().

Selection VBA Select, Selection. . Selection Range Range. Range Selection , .

With... End With

VBA . , Range("A2").Select, ActiveCell.FormulaR1C1 = " ", ActiveSheet.Range(A1). , . . With... End With . With...End With .

:

With objectExpression

[ statements ]

End With

objectExpression , . , . .

statements . With End With, , objectExpression. .

statements , objectExpression.

Range: Font, Comment, WrapText.

Range , Excel . : (. . , , , Range) . (): 1( ) R1C1.

:

1

( 256 , ,..., Z, ,..., HZ, IA,..., IV) (1,...., 16384).

, A1, C2.

R1C1

.

, R1C1, R2C3.

:

1

"$", ( ) ( ). , $10, $10 $$10 , 10 10 .

R1C1

. , . , . , R2C3, R[1]C[-1] R3C2.

R1C1 .

Office 2003 > > > R1C1

Office 2007 Office , Excel > > R1C1

Office 2010/2013

A1 =B3 (B3 ), R1C1 =R[2]C[1]. R1C1 . R (row) (, , R[-2] ). C 1 ( C[-1] ). , .

A1 =$B$3 ($B$3 ), R1C1 =R3C2. , , ( ).

, . "!", .

,

1

2!1

[.ls]2!1

A1 , A1 2 , A1 2 .xls .

:

- . 9 ;

- F3 = D3*E3 F3 F10.

- E11 :.

- F11 = (F3:F10).

, Excel, .

Sub ()

 

'

' 09.10.2015 (Neklyudova)

'

ActiveCell.FormulaR1C1 = "=RC[-2]*RC[-1]"

Range("F3").Select

Selection.AutoFill Destination:=Range("F3:F10"), Type:=xlFillDefault

Range("F3:F10").Select

Range("E11").Select

ActiveCell.FormulaR1C1 = ":"

Range("F11").Select

ActiveCell.FormulaR1C1 = "=SUM(R[-8]C:R[-1]C)"

Range("F12").Select

Range("F12").Select

End Sub

 

1. A2: F2

- ;

- ;

- ,

2. A, B, C, D, E, F , , (. 8).

3. A1:F1 , . Arial Cyr, 14, , , .

4. , , A11:E11, .

5. A3:A10 E3:E10 , 0.

6. D3:D10 F3:F11, , 2 .

7. A3:C10 .

8. D3:D10 .

9. E3:F10 .

10. : .

:

Sub ()

'

'

' 09.10.2015 (Neklyudova)

'

Range("A2:F2").Select

With Selection

.HorizontalAlignment = xlCenter

.VerticalAlignment = xlTop

.WrapText = True

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

Selection.Font.Bold = True

Columns("A:A").ColumnWidth = 11

Columns("A:A").ColumnWidth = 8.71

Columns("B:B").ColumnWidth = 13

Columns("B:B").ColumnWidth = 14.29

Columns("B:B").ColumnWidth = 15.43

Columns("C:C").ColumnWidth = 12.14

Columns("D:D").ColumnWidth = 11.14

Columns("E:E").ColumnWidth = 11.71

Columns("E:E").ColumnWidth = 11.86

Columns("F:F").ColumnWidth = 15.57

Range("A1:F1").Select

With Selection

.HorizontalAlignment = xlCenter

.VerticalAlignment = xlBottom

.WrapText = False

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

Selection.Merge

With Selection.Font

.Name = "Arial"

.Size = 11

.Strikethrough = False

.Superscript = False

.Subscript = False

.OutlineFont = False

.Shadow = False

.Underline = xlUnderlineStyleNone

.ThemeColor = xlThemeColorLight1

.TintAndShade = 0

.ThemeFont = xlThemeFontNone

End With

With Selection.Font

.Name = "Arial"

.Size = 14

.Strikethrough = False

.Superscript = False

.Subscript = False

.OutlineFont = False

.Shadow = False

.Underline = xlUnderlineStyleNone

.ThemeColor = xlThemeColorLight1

.TintAndShade = 0

.ThemeFont = xlThemeFontNone

End With

Selection.Font.Bold = True

Range("A2:F11").Select

Selection.Borders(xlDiagonalDown).LineStyle = xlNone

Selection.Borders(xlDiagonalUp).LineStyle = xlNone

With Selection.Borders(xlEdgeLeft)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeTop)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeBottom)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeRight)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlInsideVertical)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlInsideHorizontal)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

Range("A11:E11").Select

With Selection

.HorizontalAlignment = xlRight

.VerticalAlignment = xlBottom

.WrapText = False

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = True

End With

Range("A3:F3").Select

Selection.Borders(xlDiagonalDown).LineStyle = xlNone

Selection.Borders(xlDiagonalUp).LineStyle = xlNone

With Selection.Borders(xlEdgeLeft)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeTop)

.LineStyle = xlDouble

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThick

End With

With Selection.Borders(xlEdgeBottom)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeRight)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlInsideVertical)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

Selection.Borders(xlInsideHorizontal).LineStyle = xlNone

Range("A10:F10").Select

Selection.Borders(xlDiagonalDown).LineStyle = xlNone

Selection.Borders(xlDiagonalUp).LineStyle = xlNone

With Selection.Borders(xlEdgeLeft)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeTop)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeBottom)

.LineStyle = xlDouble

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThick

End With

With Selection.Borders(xlEdgeRight)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlInsideVertical)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

Selection.Borders(xlInsideHorizontal).LineStyle = xlNone

Range("D3:D10,F3:F11").Select

Range("F3").Activate

Selection.NumberFormat = "#,##0.00$"

Range("A3:C10").Select

With Selection

.HorizontalAlignment = xlLeft

.VerticalAlignment = xlBottom

.WrapText = False

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

Range("D3:D10").Select

With Selection

.HorizontalAlignment = xlCenter

.VerticalAlignment = xlBottom

.WrapText = False

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

Range("E3:F10").Select

With Selection

.HorizontalAlignment = xlRight

.VerticalAlignment = xlBottom

.WrapText = False

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

Range("A11:F11").Select

Selection.Font.Bold = True

Selection.Font.Italic = True

End Sub

 

( , , , , ) , , , .


 

  1 100,00.   50 000,00.
  2 200,00.   1 000 000,00.
  3 300,00.   15 000 000,00.
          0,00.
          0,00.
          0,00.
          0,00.
          0,00.
: 16 050000,00.

.19.

:

Sub ()

'

'

' 09.10.2054 (Neklyudova)

'

Range("A3").Select

ActiveCell.FormulaR1C1 = "101"

Range("B3").Select

ActiveCell.FormulaR1C1 = "1"

Range("C3").Select

ActiveCell.FormulaR1C1 = "."

Range("D3").Select

ActiveCell.FormulaR1C1 = "100"

Range("E3").Select

ActiveCell.FormulaR1C1 = "500"

Range("A4").Select

ActiveCell.FormulaR1C1 = "102"

Range("B4").Select

ActiveCell.FormulaR1C1 = "2"

Range("C4").Select

ActiveCell.FormulaR1C1 = "."

Range("D4").Select

ActiveCell.FormulaR1C1 = "200"

Range("E4").Select

ActiveCell.FormulaR1C1 = "5000"

Range("A5").Select

ActiveCell.FormulaR1C1 = "103"

Range("B5").Select

ActiveCell.FormulaR1C1 = "3"

Range("C5").Select

ActiveCell.FormulaR1C1 = "."

Range("D5").Select

ActiveCell.FormulaR1C1 = "300"

Range("E5").Select

ActiveCell.FormulaR1C1 = "50000"

Range("A6").Select

End Sub

 

, , , :

-

-

-

- .

 

Option Explicit

 
 


Sub ()

'

'

' 09.01.2015 (Neklyudova)

'

ActiveCell.FormulaR1C1 = " "

Range("A2").Select

ActiveCell.FormulaR1C1 = " "

Range("B2").Select

ActiveCell.FormulaR1C1 = " "

Range("C2").Select

ActiveCell.FormulaR1C1 = " "

Range("D2").Select

ActiveCell.FormulaR1C1 = ""

Range("E2").Select

ActiveCell.FormulaR1C1 = ""

Range("F2").Select

ActiveCell.FormulaR1C1 = ""

Range("F3").Select

End Sub

 
 


Sub ()

 

'

' 09.10.2015 (Neklyudova)

'

ActiveCell.FormulaR1C1 = "=RC[-2]*RC[-1]"

Range("F3").Select

Selection.AutoFill Destination:=Range("F3:F10"), Type:=xlFillDefault

Range("F3:F10").Select

Range("E11").Select

ActiveCell.FormulaR1C1 = ":"

Range("F11").Select

ActiveCell.FormulaR1C1 = "=SUM(R[-8]C:R[-1]C)"

Range("F12").Select

Range("F12").Select

End Sub


 
 


Sub ()

'

'

' 09.10.2015 (Neklyudova)

'

Range("A2:F2").Select

With Selection

.HorizontalAlignment = xlCenter

.VerticalAlignment = xlTop

.WrapText = True

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

Selection.Font.Bold = True

Columns("A:A").ColumnWidth = 11

Columns("A:A").ColumnWidth = 8.71

Columns("B:B").ColumnWidth = 13

Columns("B:B").ColumnWidth = 14.29

Columns("B:B").ColumnWidth = 15.43

Columns("C:C").ColumnWidth = 12.14

Columns("D:D").ColumnWidth = 11.14

Columns("E:E").ColumnWidth = 11.71

Columns("E:E").ColumnWidth = 11.86

Columns("F:F").ColumnWidth = 15.57

Range("A1:F1").Select

With Selection

.HorizontalAlignment = xlCenter

.VerticalAlignment = xlBottom

.WrapText = False

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

Selection.Merge

With Selection.Font

.Name = "Arial"

.Size = 11

.Strikethrough = False

.Superscript = False

.Subscript = False

.OutlineFont = False

.Shadow = False

.Underline = xlUnderlineStyleNone

.ThemeColor = xlThemeColorLight1

.TintAndShade = 0

.ThemeFont = xlThemeFontNone

End With

With Selection.Font

.Name = "Arial"

.Size = 14

.Strikethrough = False

.Superscript = False

.Subscript = False

.OutlineFont = False

.Shadow = False

.Underline = xlUnderlineStyleNone

.ThemeColor = xlThemeColorLight1

.TintAndShade = 0

.ThemeFont = xlThemeFontNone

End With

Selection.Font.Bold = True

Range("A2:F11").Select

Selection.Borders(xlDiagonalDown).LineStyle = xlNone

Selection.Borders(xlDiagonalUp).LineStyle = xlNone

With Selection.Borders(xlEdgeLeft)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeTop)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeBottom)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeRight)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlInsideVertical)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlInsideHorizontal)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

Range("A11:E11").Select

With Selection

.HorizontalAlignment = xlRight

.VerticalAlignment = xlBottom

.WrapText = False

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = True

End With

Range("A3:F3").Select

Selection.Borders(xlDiagonalDown).LineStyle = xlNone

Selection.Borders(xlDiagonalUp).LineStyle = xlNone

With Selection.Borders(xlEdgeLeft)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeTop)

.LineStyle = xlDouble

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThick

End With

With Selection.Borders(xlEdgeBottom)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeRight)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlInsideVertical)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

Selection.Borders(xlInsideHorizontal).LineStyle = xlNone

Range("A10:F10").Select

Selection.Borders(xlDiagonalDown).LineStyle = xlNone

Selection.Borders(xlDiagonalUp).LineStyle = xlNone

With Selection.Borders(xlEdgeLeft)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeTop)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlEdgeBottom)

.LineStyle = xlDouble

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThick

End With

With Selection.Borders(xlEdgeRight)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

With Selection.Borders(xlInsideVertical)

.LineStyle = xlContinuous

.ColorIndex = 0

.TintAndShade = 0

.Weight = xlThin

End With

Selection.Borders(xlInsideHorizontal).LineStyle = xlNone

Range("D3:D10,F3:F11").Select

Range("F3").Activate

Selection.NumberFormat = "#,##0.00$"

Range("A3:C10").Select

With Selection

.HorizontalAlignment = xlLeft

.VerticalAlignment = xlBottom

.WrapText = False

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

Range("D3:D10").Select

With Selection

.HorizontalAlignment = xlCenter

.VerticalAlignment = xlBottom

.WrapText = False

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

Range("E3:F10").Select

With Selection

.HorizontalAlignment = xlRight

.VerticalAlignment = xlBottom

.WrapText = False

.Orientation = 0

.AddIndent = False

.IndentLevel = 0

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

Range("A11:F11").Select

Selection.Font.Bold = True

Selection.Font.Italic = True

End Sub

 
 


Sub ()

'

'

' 09.10.2015 (Neklyudova)

'

Range("A3").Select

ActiveCell.FormulaR1C1 = "101"

Range("B3").Select

ActiveCell.FormulaR1C1 = "1"

Range("C3").Select

ActiveCell.FormulaR1C1 = "."

Range("D3").Select

ActiveCell.FormulaR1C1 = "100"

Range("E3").Select

ActiveCell.FormulaR1C1 = "500"

Range("A4").Select

ActiveCell.FormulaR1C1 = "102"

Range("B4").Select

ActiveCell.FormulaR1C1 = "2"

Range("C4").Select

ActiveCell.FormulaR1C1 = "."

Range("D4").Select

ActiveCell.FormulaR1C1 = "200"

Range("E4").Select

ActiveCell.FormulaR1C1 = "5000"

Range("A5").Select

ActiveCell.FormulaR1C1 = "103"

Range("B5").Select

ActiveCell.FormulaR1C1 = "3"

Range("C5").Select

ActiveCell.FormulaR1C1 = "."

Range("D5").Select

ActiveCell.FormulaR1C1 = "300"

Range("E5").Select

ActiveCell.FormulaR1C1 = "50000"

Range("A6").Select

End Sub

 

, __.

VBE. , :

- ;

- , ;

- Range.

:

Option Explicit

Sub ()

'

'

' 09.10.2015 (Neklyudova)

'

Range("A1") = " "

Range("A2") = " "

Range("B2") = " "

Range("C2") = " "

Range("D2") = ""

Range("E2") = ""

Range("F2") = ""

End Sub

:

Sub ()

'

'

' 09.10.2015 (Neklyudova)

'

Range("F3").Select

ActiveCell = "=D3*E3"

Selection.AutoFill Destination:=Range("F3:F10"), Type:=xlFillDefault

Range("E11") = ":"

Range("F11") = "=SUM(F3:F10)"

End Sub

VBA, , Excel.

.

__ __. . .

, , , .11.

, . Call.

Call

Call

Call

, , , , .. , . 8.

__ _ _ . : , . . , .

, :

__

__

_ _

__ , VBA : , , . , , .

, , , , .

__ c . : 1, 2, 3, 4 , , .

__ , , :

. , .






:


: 2016-12-29; !; : 547 |


:

:

, ,
==> ...

1693 - | 1614 -


© 2015-2024 lektsii.org - -

: 0.881 .