copy/paster to another worksheet

gzell

New Member
Joined
Apr 20, 2019
Messages
37
I am trying to find a code that will copy and paste cells to another worksheet based on other cells value. The cells with value 1_1, 1_2. 1_3, 1_4, 1_5, 1_6, 1_7 1_8, 1_9, 1_9, 1_10, 1_11. 1_12 are the values in column f. These rows would be copy/pasted to another worksheet.


Any help would be greatly appreciated.


spreadsheet
11AbleEzekiel
21AbleEzekiel 1_1Army: Confederacy
22AbleEzekiel 1_2Location: Texas
41AbleEzekiel 1_3Regiment: 10th Regiment Texas Infantry (Nelson's)
51AbleEzekiel 1_4Function: Infantry
61AbleEzekiel 1_5Company: C
71AbleEzekiel 1_6Rank: Private
81AbleEzekiel 1_7Age: --
91AbleEzekiel 1_8Residence: --
101AbleEzekiel 1_9Enrolled: Buchanan, Johnson County, Texas
111AbleEzekiel 1_10Date: October 16, 1861
121AbleEzekiel 1_11Enlisted: Houston, Texas
131AbleEzekiel 1_12Date: October 25, 1861
141AbleEzekiel 2_1Detail: Hospital Nurse
151AbleEzekiel 2_1Detail: November 8, 1862
161AbleEzekiel 3_1Relieved of Duty: Nurse
171AbleEzekiel 3_1Date: February 4, 1862
181AbleEzekiel 4_1Captured: Battle of Arkansas Post
191AbleEzekiel 4_1Date: January 11, 1863
201AbleEzekiel 4_2Forwarded: St. Louis, Missouri via Boats
211AbleEzekiel 4_3Forwarded: Camp Douglas, Illinois via Rail
221AbleEzekiel 4_4Prisoner: Camp Douglas, Illinois
231AbleEzekiel 4_5Died: March 7, 1863
241AbleEzekiel 4_5Cause: Small Pox
252AdamsJohnH
262AdamsJohnH1_1Army: Confederacy
272AdamsJohnH1_2Location: Texas
282AdamsJohnH1_3Regiment: 10th Regiment Texas Infantry (Nelson's)
292AdamsJohnH1_4Function: Infantry
302AdamsJohnH1_5Company: I
312AdamsJohnH1_6Rank: Corporal
322AdamsJohnH1_7Age: 42
332AdamsJohnH1_8Residence: Johnson County, Texas
342AdamsJohnH1_9Enlisted: Kimball Texas or Millican, Texas
352AdamsJohnH1_10Date: January 16, 1862
362AdamsJohnH2_1Captured: Battle Arkansas Post, Arkansas
372AdamsJohnH2_1Date: January 11, 1863
382AdamsJohnH2_1Forwarded: St. Louis, Missouri via Boats
392AdamsJohnH2_1Forwarded: Camp Douglas, Illinois via Rail

<colgroup><col style="mso-width-source:userset;mso-width-alt:2816;width:58pt" width="77"> <col style="mso-width-source:userset;mso-width-alt:2669;width:55pt" width="73"> <col style="mso-width-source:userset;mso-width-alt:3474;width:71pt" width="95"> <col style="mso-width-source:userset;mso-width-alt:3291;width:68pt" width="90"> <col style="mso-width-source:userset;mso-width-alt:3474;width:71pt" width="95"> <col style="mso-width-source:userset;mso-width-alt:2121;width:44pt" width="58"> <col style="mso-width-source:userset;mso-width-alt:21906;width:449pt" width="599"> </colgroup><tbody>
</tbody>
 

Some videos you may like

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,526
Office Version
  1. 365
Platform
  1. Windows
How about
Code:
Sub gzell()
    With Sheets("[COLOR=#ff0000]Master[/COLOR]")
        .Range("A1:G1").AutoFilter 6, "1_*"
        .AutoFilter.Range.Offset(1).EntireRow.Copy Sheets("[COLOR=#ff0000]Sheet2[/COLOR]").Range("A" & Rows.Count).End(xlUp).Offset(1)
        .AutoFilterMode = False
    End With
End Sub
Change sheet names to suit
 

gzell

New Member
Joined
Apr 20, 2019
Messages
37
Thanks. Worked great. My attempt was far to complicated and the loop did not work. this is good. One additional question. Please let me know if i need to open another thread. I would like to keep name on on first entry but not have them in the other entries. Meaning first entry for each person has the name but is blank until name changes.

Thanks again for the help.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,526
Office Version
  1. 365
Platform
  1. Windows
That would need to be another thread, thanks
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,526
Office Version
  1. 365
Platform
  1. Windows
You're welcome
 

Watch MrExcel Video

Forum statistics

Threads
1,127,539
Messages
5,625,402
Members
416,100
Latest member
lirongr1996

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
Top