The INDEX function is a built-in function in Excel that is categorized as a Lookup/Reference Function. It can be used as a worksheet function (WS) in Excel. As a worksheet function, the INDEX function can be entered as part of a formula in a cell of a worksheet. Excel 2013 VBA and Macros ... This line of code references Sheet1 of the active workbook even if Sheet2 is the active sheet. If you need to reference a range in ...

Excel VBA allows us to specify any Sheet by using it's Index number, but unfortunately this method is not used by Excel when we record a macro. It uses the Sheets Tab name like; Sheets("Budget").Select If this sheet was the third from the left we could use: Sheets(3).Select . In VBA Range is an object but Cell is a property in excel sheet. In VBA we have two ways of referencing a cell object one is through Range and another one is through Cells. For an example, if you want to reference as cell C5 you can use two methods to refer the cell C5.