Macro code to copy & paste cell data

Maverick27

Active Member
Joined
Sep 23, 2010
Messages
333
Office Version
  1. 2013
Platform
  1. Windows
Hi

Anyone care to share a Macro code to copy & paste the data from Cells C & D to Cells A & B ?

Screenshot_2.png


Final output:

Screenshot_3.png


Below is the criteria rules for formulating the Macro Code:

1. Copy the Data from Cell C & Cell D below the Cell containing the Text "Invoice" on Col D
2. Paste the data on Cell A & Cell B on the 1st instance data of Col C eg: A7/ B7 & A16/B16...etc
3. The Final Row at the bottom of the Sheet is on A6060 & B6060

Final Row Screenshot

Screenshot_4.png


Thanks in Advance
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
MREXCEL.xlsx
ABCDEFGHIJK
1NoTypeDateDue DateTrans. DateOrder No
22451445Invoice4538445384453842402009
32451445CC0002ALLIANCE PLUMBING SYSTEMS LIMITEDKES
4FS/MS
5NAIROBI
6Delivery Note 2451455
72451445CC0002OHA00241Ohms 2In1 Blender 1.5L 500W Obp-600G472510.64224.15S
8Total Delivery Note 2451455, 4,224.15
9Total ItemsTag/ObjectVAT Amount4224.15
101FS/MS,NA,NBI,RET675.86
112451446Invoice4538445384453842402012
122451446CC0002CASH SALE (WESTLANDS)KES
13FS/MS
14726249490NAIROBI
15Delivery Note 2451456
162451446CC0002CEO03041Coupe Dinner Plate 16" 41Cm 210-161N37133713S
17CEO03031Coupe Dinner Plate 14" 34Cm 210-141N21602160S
18CEO02871Rect.Rim Deep Platter 15.75" x 5.85" 710-162R31193119S
19CEO01431Slant Square Plate 28Cm 707-11115381538S
20CEO01462Slant Rectangle Plate 31Cm x 19Cm 707-1239651930S
21JBP01211686 Clear Pc 2 Tier Fruit Tray 35Cm/25Cm31253125S
22Total Delivery Note 2451456, 15,585.00
23MPESA - SD2IVDVQ2DS - KSH 18,078/=
24Total ItemsTag/ObjectVAT Amount15585
257FS/MS,NA,NBI,RET2493.6
262451447Invoice4538445384453842402014
272451447CC0002SPEZ LTDKES
28FS/MS
29
30Delivery Note 2451457
31JBP008418114TG Grey Pp 4 Compartmen Cutlery Box16451645S
32Total Delivery Note 2451457, 1,645.00
33SCS4DTC4PG Confirmed. Ksh 1908
34Total ItemsTag/ObjectVAT Amount1645
351FS/MS,NA,NBI,RET263.2
362451448Invoice4538445384453842402015
372451448CC0002CASH SALE (WESTLANDS)KES
38FS/MS
39NAIROBI
40Delivery Note 2451458
41TES00341Tesc.Crêpe Turner With Spreader "Delicia"630066956956S
42Total Delivery Note 2451458, 956.00
43Paid in cash
44Total ItemsTag/ObjectVAT Amount956
451FS/MS,NA,NBI,RET152.96
462451449Invoice4538445414453842402016
472451449CC0005CATERMART LTDKES
48MSMKTP.O.BOX: 261 - 00621
49NAIROBI
50DeliveryPIN: P051130877X
51MR.NASIM KADRI
52Delivery Note 2451459
53CEO000712Dynasty Deep Soup Plate 24.5Cm 610-V1026167392S
54Total Delivery Note 2451459, 7,392.00
55Total ItemsTag/ObjectVAT Amount7392
56
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F:FCell Value="Invoice"textNO
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,195
Members
452,616
Latest member
intern444

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