Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

Category: Cells Ranges Offset

0

VBA-Excel: Select and Activate Cells — Activate

Here is some­thing inter­est­ing for you, you can use a Acti­vate method to acti­vate a cell within a selec­tion. Acti­vat­ing a Cell Within a Selec­tion Sub Acti­vate­CellInS­e­lec­tion() Worksheets(“Sheet4”).Select Worksheets(“Sheet4”).Range(“A1:H6”).Select Worksheets(“Sheet4”).Range(“D3”).Activate End Sub

VBA Excel – Looping Through a Range of Cells"> 0

VBA Excel – Looping Through a Range of Cells">VBA Excel – Looping Through a Range of Cells

Refer­ring Excel cells using For…Next –Loop For i = 1 to 10 Range(“A” & i).Value = 1 Next Enter ‘1’ in Cells from A1 to A10. Refer­ring Columns of excels using For-Loop For i =…

VBA Excel – Refer to Multiple Ranges : Union Method"> 3

VBA Excel – Refer to Multiple Ranges : Union Method">VBA Excel – Refer to Multiple Ranges : Union Method

You can com­bine more than one Ranges into one Range using Union Method and later on instead of writ­ing all the ranges repeat­edly, just use the com­bined one. Exam­ple Sub Com­bile­Mul­ti­pleRange() Dim obj­Com­binedR as Range…

VBA Excel — Cells, Ranges and Offset: Refer to Cells by Using Shortcut Notation"> 2

VBA Excel — Cells, Ranges and Offset: Refer to Cells by Using Shortcut Notation">VBA Excel — Cells, Ranges and Offset: Refer to Cells by Using Shortcut Notation

You don’t have to type Range every time, you have short­cut for that, ‘Brack­ets’. Short­cut for refer­ring one cell. Worksheets(“Sheet1”).[G5].Interior.ColorIndex = 45 Instead of using Range(“G5”), you can use [G5]. Short­cut for refer­ring range of cells. Worksheets(“Sheet1”).[E3:F5].Value = 4…

VBA Excel — Cells, Ranges and Offset: Refer Range by using A1 Notations"> 0

VBA Excel — Cells, Ranges and Offset: Refer Range by using A1 Notations">VBA Excel — Cells, Ranges and Offset: Refer Range by using A1 Notations

In the ear­lier tuto­r­ial (Range), you have seen how you use Range prop­erty. In this tuto­r­ial you will see the many dif­fer­ent ways to use Range prop­erty to refer the excel sheet’s rows and…

VBA Excel — Cells, Ranges and Offset : Offset"> 2

VBA Excel — Cells, Ranges and Offset : Offset">VBA Excel — Cells, Ranges and Offset : Offset

Off­set: Off­set prop­erty in VBA-Excel is used along with Range. With the help of Off­set prop­erty user can move around in the sheet. For­mat: Range(“StartingPoint”).Offset(NoOfRowsToBeMoved , NoOf­Column­sToBe­Moved) Exam­ple : Range(“A2”).Offset(1,0).Select And com­piler reads, move one cell down…

VBA Excel — Cells, Ranges and Offset : Range"> 0

VBA Excel — Cells, Ranges and Offset : Range">VBA Excel — Cells, Ranges and Offset : Range

For­mat: Range (“Column­NameRowNum­ber”) Ex: In VBA-Excel when you say Range(“A5”) it’s very easy to under­stand that you are talk­ing about 5th row in 1st col­umn (“A”) As the name states Range, you can select a…