Macro to Copy Cell Adjacent in One Sheet and Paste in Another Sheet

JPatty

New Member
Joined
Sep 21, 2022
Messages
14
Office Version
  1. 365
  2. 2019
  3. 2011
Platform
  1. Windows
I have a worksheet that has only one that contains the "shipping". I need to copy the cell in the same row 6 columns to the right, then paste in another sheet labeled "Data".
Thank you in advance for any help.



NameAcctCodeTypeName2AddressAddress2CityStateZip
US Corp
123456​
0001ShippingUS Corp DC123 W. Business StSte 300NYCNY01234
China Corp
123457​
0002ReceivingChina Corp DC124 W. Business StSte 301China CityN/AN/A
Canada Corp
123458​
0003ReceivingCanada Corp DC125 W. Business StSte 302Canada CityN/AN/A
Brazil Corp
123459​
0004ReceivingBrazil Corp DC126 W. Business StSte 303Brazil CityN/AN/A
UK Corp
123460​
0005ReceivingUK Corp DC127 W. Business StSte 304UK CityN/AN/A
Germany Corp
123461​
0006ReceivingGermany Corp DC128 W. Business StSte 305Germany CityN/AN/A
Italy Corp
123462​
0007ReceivingItaly Corp DC129 W. Business StSte 306Italy CityN/AN/A
Mexico Corp
123463​
0008ReceivingMexico Corp DC130 W. Business StSte 307Mexico CityN/AN/A
Poland Corp
123464​
0009ReceivingPoland Corp DC131 W. Business StSte 308Poland CityN/AN/A
Russia Corp
123465​
0010ReceivingRussia Corp DC132 W. Business StSte 309Russia CityN/AN/A
Peru Corp
123466​
0011ReceivingPeru Corp DC133 W. Business StSte 310Peru CityN/AN/A
Australia Corp
123467​
0012ReceivingAustralia Corp DC134 W. Business StSte 311Australia CityN/AN/A
Thailand Corp
123468​
0013ReceivingThailand Corp DC135 W. Business StSte 312Thailand CityN/AN/A
Vietnam Corp
123469​
0014ReceivingVietnam Corp DC136 W. Business StSte 313Vietnam CityN/AN/A
Holland Corp
123470​
0015ReceivingHolland Corp DC137 W. Business StSte 314Holland CityN/AN/A
Egypt Corp
123471​
0016ReceivingEgypt Corp DC138 W. Business StSte 315Egypt CityN/AN/A
South Africa Corp
123472​
0017ReceivingSouth Africa Corp DC139 W. Business StSte 316South Africa CityN/AN/A
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Try:
VBA Code:
Sub CopyData()
    Cells(Range("D:D").Find("Shipping").Row, 5).Resize(, 6).Copy Sheets("Data").Cells(Sheets("Data").Rows.Count, "A").End(xlUp).Offset(1)
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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