efficient code to move group of cells from one tab to another


New Member
Jun 8, 2015
hey guys,

I have a tab that has main info. The tab has the code below to filter out and create new sheets based on a word.

I am trying to get certain cells from the output to be placed in corresponding cells within other tabs instead of random sheets. how can I have the data go from the main tab and move to other tabs (tabs available are 201, 101, 301, 401) cells to be placed in B22, C22, E22 OF Each corresponding tab

Sub test()
Dim myAreas As Areas, myArea As Range, n As Long
Const wsName As String = "Result"
CheckWS wsName
With Sheets("Aged DQ").Cells(1).CurrentRegion
.Rows(1).Copy Sheets(wsName).[b1]: n = 2
On Error Resume Next
Set myAreas = .Columns(1).SpecialCells(2, 1).Areas
On Error GoTo 0
If Not myAreas Is Nothing Then
For Each myArea In myAreas
myArea(0).Copy Sheets(wsName).Cells(n, 1).Resize(myArea.Count)
myArea.Resize(, .Columns.Count).Copy Sheets(wsName).Cells(n, 2)
n = n + myArea.Count
MsgBox "No dates"
End If
End With
End Sub

Is there a better way? I am not good at VBA but trying to learn. also,

see the sheet attached.

As you can see there are numbers and dates in the same column (these need to be separated)

Every number would have a created worksheet.. (which will already be generated) Information in the Date column (not whole numbers would need to be dates starting in Cell b22 and going down.. category column would start at c22 in each sheet and go down and the amount column would start at E22 and go down.

any help would be appreciated.

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...