VBA Code to extract Data

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,568
Office Version
  1. 2021
Platform
  1. Windows
I would like a macro to open up a source workbook and to copy the data into the destination workbook as follows:


1) Where the name in E2 matches the name in the destination workbook, Col B (these are in row B7:B40) , I need the value in Col F that is in the same row where "Zero Rate" appears, to be copied into col N, in the same row where the names matches the source workbook
2) Where the name in E2 matches the name in the destination workbook, Col B (these are in row B7:B40) , I need the value in Col F that is in the same row where "Exempt" appears, to be copied into col M, in the same row where the names matches the source workbook


I have attached sample data from the source workbook as well as the dastination workbook


Your assistance in this regard is most appreciated


Excel Workbook
ABCDEFGH
1ENDTime: 01:50:21
2CompanyBR1Date: 29/06/2012
3
4R E G I S T E RR E P O R TPage: 1
5
6
7InclusiveVAT AmountNet Amount
8
9SALES (OUTPUTTAX) Standard Rate1,261,591.19155,511.251,106,079.95
10Vehicle Transfers Out0.000.000.000
11Warranty Payments10,550.191,295.649,254.55
12Zero Rate-210,233.640.00-210,233.64
13Exempt0.000.000.00
14Output Vat Posting0.000.000.00
15-------------- ----------------------------
16SUB-TOTAL1,061,907.74156,806.88905,100.860
17Change In Use0.000.000.00-156807
18-------------- ----------------------------
19TOTAL OUTPUT TAX1,061,907.74156,806.88905,100.86
20-------------- ----------------------------
210.000.000.00
22
23
Sheet1


Excel Workbook
BMN
6Exempt SalesZero Rated Sales
7BR10.00
8BR2-98,307.91
9BR3-23,014.24
10BR40.00-9,363.00
11BR5-93,523.00-12,293.00
12BR6-108,785.80
13BR7-6,117.56
14--
15Total-329,748.51-21,656.00
16--
Jun-2012
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,215,775
Messages
6,126,828
Members
449,343
Latest member
DEWS2031

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