Be the first user to complete this post

  • 0
Add to List

VBA-Excel : 3D-Ranges – FillAcrossSheets Method

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

Steps:

  • 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.
Function FnFillAcrossSheets()

         arrCombinedArray = Array("Sheet2", "Sheet3", "Sheet4")

         Sheets(arrCombinedArray).FillAcrossSheets.Worksheets("Sheet1").Range("A1:B5")

End Function 

This function will copy the A1 to B5 Range of data from sheet1 and fill the same data in "Sheet2", "Sheet3", "Sheet4"




Also Read:

  1. VBA Codes - Record Macro
  2. VBA-Excel: Arrays – Multi Dimensional Array
  3. VBA-Excel: Fill Excel Range Values in a 2D Array
  4. VBA-Excel: Application.Wait OR Wait Method
  5. VBA-Excel: Modified Consolidator – Merge or Combine Multiple Excel Files Into One Where Columns Are Not In Order
  6. How to Enable Macro in Excel
  7. VBA-Excel: Create Dynamic or Run-time WorkSheets using Macro.