VBA-Excel: Cells Ranges Offset – Active Cell

ActiveCell, as the name clearly indicates that the cell which is presently active in your worksheet, in other words you can if u start typing the value u entered will go to active cell.


Function FnActiveCell()

         Dim mainWorkBook As Workbook

         Set mainWorkBook = ActiveWorkbook   


     ActiveCell.Value = 5

Read more

VBA-Excel : 3D-Ranges – FillAcrossSheets Method


By using FillAcrossSheets you can copy the Range of one worksheet to other multiple worksheets.


  • Create an array and assign multiple worksheets names ( in which the data to be copied), as an array elements.
  • Copy the range of main worksheet and paste it to the other sheets using FillAcrossSheets.

Read more

VBA-Excel : 3D-Ranges – Working with Multiple WorkSheets At The Simultaneously

You can update the multiple worksheets at the same time. If you want to do the similar action on the same range on multiple sheets, all you need to do is use Array Function to specify multiple sheets name as array elements

Sub MultipleSheets()

    Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select


    Selection.Value = 7

Read more

VBA-Excel: Select and Activate Cells – Select


You can Select a cells or cells for performing many activities like putting some value in cell or doing formatting or copy-paste the data. You can put or enter values in cells with/without selecting the cells. Select is used mostly in the cases of copy-paste operation where you have to tell the compiler specifically that from which cell it has to copy the data and in which cell it needs to be pasted.


Select works only with actives worksheets, if you use Select on cells before activating the respective sheet, the select method will fail and you will get “Run-time error ‘1004’: Application defined or object defined error”

Read more