Macro to transfer to different sheet

Doublecork

New Member
Joined
Sep 8, 2009
Messages
25
I would like to know if there is a way to transfer the data in column A,B,D,G to Sheet2 and Sheet3? I would like to have all the even locations in column A transferred to sheet2 and all the odd locations in column A transferred to sheet3 if possible. The only thing the will change in column A is the firstletter the bay locations range from A to Z.
Thanks in advance for all help.

A B C D E F G H
[TABLE="width: 822"]
<tbody>[TR]
[TD]T029C
[/TD]
[TD]C2739
[/TD]
[TD]4/9/2018 11:26
[/TD]
[TD]ALEVE CAP/ARTHR 320ct INSERT/DIVIDER
[/TD]
[TD]361
[/TD]
[TD]----
[/TD]
[TD]100000008785028
[/TD]
[TD]1.8E+14
[/TD]
[/TR]
[TR]
[TD]T041D
[/TD]
[TD]C7347
[/TD]
[TD]5/29/2018 7:35
[/TD]
[TD]Shipper ASP D/N C&F Power Gel 24ct
[/TD]
[TD]250
[/TD]
[TD]----
[/TD]
[TD]100000008758754
[/TD]
[TD]1.81E+14
[/TD]
[/TR]
[TR]
[TD]T043B
[/TD]
[TD]C7347
[/TD]
[TD]5/29/2018 6:48
[/TD]
[TD]Shipper ASP D/N C&F Power Gel 24ct
[/TD]
[TD]250
[/TD]
[TD]----
[/TD]
[TD]100000008758801
[/TD]
[TD]1.81E+14
[/TD]
[/TR]
[TR]
[TD]T043C
[/TD]
[TD]C7347
[/TD]
[TD]5/29/2018 7:34
[/TD]
[TD]Shipper ASP D/N C&F Power Gel 24ct
[/TD]
[TD]250
[/TD]
[TD]----
[/TD]
[TD]100000008758755
[/TD]
[TD]1.81E+14
[/TD]
[/TR]
[TR]
[TD]T044C
[/TD]
[TD]61566897
[/TD]
[TD]2/25/2016 10:36
[/TD]
[TD]CPP 16-56560TR TRAY
[/TD]
[TD]80
[/TD]
[TD]----
[/TD]
[TD]100000007581725
[/TD]
[TD]----
[/TD]
[/TR]
[TR]
[TD]T044C
[/TD]
[TD]61566897
[/TD]
[TD]2/27/2016 7:16
[/TD]
[TD]CPP 16-56560TR TRAY
[/TD]
[TD]57
[/TD]
[TD]----
[/TD]
[TD]100000007581725
[/TD]
[TD]----
[/TD]
[/TR]
[TR]
[TD]T044C
[/TD]
[TD]61566897
[/TD]
[TD]2/23/2016 16:43
[/TD]
[TD]CPP 16-56560TR TRAY
[/TD]
[TD]350
[/TD]
[TD]----
[/TD]
[TD]100000007581726
[/TD]
[TD]----
[/TD]
[/TR]
[TR]
[TD]T049D
[/TD]
[TD]C7347
[/TD]
[TD]5/29/2018 6:48
[/TD]
[TD]Shipper ASP D/N C&F Power Gel 24ct
[/TD]
[TD]250
[/TD]
[TD]----
[/TD]
[TD]100000008758802
[/TD]
[TD]1.81E+14
[/TD]
[/TR]
[TR]
[TD]T051D
[/TD]
[TD]MF231769
[/TD]
[TD]4/9/2018 12:28
[/TD]
[TD]Shipping Column
[/TD]
[TD]216
[/TD]
[TD]----
[/TD]
[TD]100000008825734
[/TD]
[TD]1.8E+14
[/TD]
[/TR]
[TR]
[TD]T052D
[/TD]
[TD]61689956
[/TD]
[TD]12/30/2016 14:39
[/TD]
[TD]CPP 57175INSF Inner Shipper Filler
[/TD]
[TD]400
[/TD]
[TD]----
[/TD]
[TD]100000007966165
[/TD]
[TD]----
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
How about
Code:
Sub Filtercopy()
   Dim cl As Range
   Dim ary As Variant, Eary() As Variant, Oary() As Variant
   Dim i As Long, j As Long
   
   For Each cl In Range("A2", Range("A" & Rows.Count).End(xlUp))
      If Application.IsEven(Mid(cl.Value, 2, 3)) Then
         i = i + 1: ReDim Preserve Eary(1 To i)
         Eary(i) = cl.Value
      Else
         j = j + 1: ReDim Preserve Oary(1 To j)
         Oary(j) = cl.Value
      End If
   Next cl
   ary = Array(Eary, "Sheet2", Oary, "sheet3")
   With ActiveSheet
      For i = 0 To UBound(ary) Step 2
         If .AutoFilterMode Then .AutoFilterMode = False
         .UsedRange.AutoFilter 1, ary(i), xlFilterValues
         .AutoFilter.Range.Offset(1).Copy Sheets(ary(i + 1)).Range("A" & Rows.Count).End(xlUp).Offset(1)
      Next i
      .AutoFilterMode = False
   End With
         
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top