libRanges (Excel Range Functions)

This file containts functions to deal with range objects in Excel.

Summary
This file containts functions to deal with range objects in Excel.
Move range r down by one row
Move range r right by one row
Move range r up by one row
Move range r left by one row
Removes row r without changing r’s address
Inserts a row after the given cell’s row and returns the new row
Inserts a row before the given cell’s row and returns the new row

Functions

goDown

Public Sub goDown(As Range)

Move range r down by one row

goDown r

goRight

Public Sub goRight(As Range)

Move range r right by one row

goRight r

goUp

Public Sub goUp(As Range)

Move range r up by one row

goUp r

goLeft

Public Sub goLeft(As Range)

Move range r left by one row

goLeft r

removeRow

Public Sub removeRow(As Range)

Removes row r without changing r’s address

removeRow r

insertRowAfter

Public Function insertRowAfter(As Range) As Range

Inserts a row after the given cell’s row and returns the new row

set newRow=insertRowAfter(currentRow)

insertRowABefore

Inserts a row before the given cell’s row and returns the new row

set newRow=insertRowBefore(currentRow)
Public Sub goDown(As Range)
Move range r down by one row
Public Sub goRight(As Range)
Move range r right by one row
Public Sub goUp(As Range)
Move range r up by one row
Public Sub goLeft(As Range)
Move range r left by one row
Public Sub removeRow(As Range)
Removes row r without changing r’s address
Public Function insertRowAfter(As Range) As Range
Inserts a row after the given cell’s row and returns the new row