VBA code to pull data from one worksheet to another

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
1,501
Office Version
  1. 2016
Platform
  1. Windows
Hello Friends,
I need a VBA code for the following... there is some data in the sheet "DATABASE"

FIRST PART
I want all the above mentioned data for all 3 named ranges in a sheet "Supplier Wise" & sheet "Year Wise" starting from ROW 11 & COLUMN B:D
1) with removing duplicates keeping in mind all 3 columns
2) with sorted data as below

orders_qualitys = Order:=xlAscending
then by orders_articless = Order:=xlAscending
then by orders_units = CustomOrder:="Set(s),Pc(s),Pair(s),Dozen(s)"

SECOND PART
I want all the above mentioned data for 2 named ranges in a sheet "Supplier Wise" & sheet "Year Wise" starting from LOOK AT LAST USED ROW FROM FIRST PART THEN LEAVE 5 ROWS EMPTY & COLUMN B & COLUMN D (here column C will remain empty)
1) with removing duplicates keeping in mind 2 columns
2) with sorted data as below

orders_articless = Order:=xlAscending
then by orders_units = CustomOrder:="Set(s),Pc(s),Pair(s),Dozen(s)"

updatequalityarticleunitcodes.xlsm
ABC
1Bed SetCVC Renforce - 90 GsmSet(s)
2Bed SetCVC Renforce - 90 GsmSet(s)
3Bed SetCVC Renforce - 90 GsmSet(s)
4Side PillowCVC Renforce - 90 GsmPc(s)
5Pillow PairCVC Renforce - 90 GsmPair(s)
6Terry TowelCTN 400 Gsm PUNCHPc(s)
7Terry TowelCTN 400 Gsm PUNCHPc(s)
8Bed SetCTN Renforce - 115 GsmSet(s)
9Pillow PcCTN Renforce - 115 GsmPc(s)
10Duvet CoverCTN Renforce - 115 GsmPc(s)
11Fitted SheetMicrofiber Interlock - 135 GsmPc(s)
12Bed SetCVC Renforce - 90 GsmSet(s)
13Bed SetCVC Renforce - 90 GsmSet(s)
14Bed SetCVC Renforce - 90 GsmSet(s)
15Bed SetCTN Renforce - 115 GsmSet(s)
16Bed SetCTN Renforce - 115 GsmSet(s)
17Bed SetCTN Renforce - 115 GsmSet(s)
18Pillow PairCTN Renforce - 115 GsmPair(s)
19Side PillowCTN Renforce - 115 GsmPc(s)
20Fitted SheetCombed Jersey 135 GSMPc(s)
21Fitted SheetCTN Jersey - 140 GsmPc(s)
22Fitted SheetCTN Jersey - 140 GsmPc(s)
23Bed SetCTN Renforce - 115 GsmSet(s)
DATABASE


updatequalityarticleunitcodes.xlsm
BCD
11Fitted SheetCombed Jersey 135 GSMPc(s)
12Terry TowelCTN 400 Gsm PUNCHPc(s)
13Fitted SheetCTN Jersey - 140 GsmPc(s)
14Bed SetCTN Renforce - 115 GsmSet(s)
15Duvet CoverCTN Renforce - 115 GsmPc(s)
16Pillow PairCTN Renforce - 115 GsmPair(s)
17Pillow PcCTN Renforce - 115 GsmPc(s)
18Side PillowCTN Renforce - 115 GsmPc(s)
19Bed SetCVC Renforce - 90 GsmSet(s)
20Pillow PairCVC Renforce - 90 GsmPair(s)
21Side PillowCVC Renforce - 90 GsmPc(s)
22Fitted SheetMicrofiber Interlock - 135 GsmPc(s)
23
24
25
26
27
28Bed SetSet(s)
29Duvet CoverPc(s)
30Fitted SheetPc(s)
31Pillow PairPair(s)
32Pillow PcPc(s)
33Side PillowPc(s)
34Terry TowelPc(s)
Supplier Wise


updatequalityarticleunitcodes.xlsm
BCD
11Fitted SheetCombed Jersey 135 GSMPc(s)
12Terry TowelCTN 400 Gsm PUNCHPc(s)
13Fitted SheetCTN Jersey - 140 GsmPc(s)
14Bed SetCTN Renforce - 115 GsmSet(s)
15Duvet CoverCTN Renforce - 115 GsmPc(s)
16Pillow PairCTN Renforce - 115 GsmPair(s)
17Pillow PcCTN Renforce - 115 GsmPc(s)
18Side PillowCTN Renforce - 115 GsmPc(s)
19Bed SetCVC Renforce - 90 GsmSet(s)
20Pillow PairCVC Renforce - 90 GsmPair(s)
21Side PillowCVC Renforce - 90 GsmPc(s)
22Fitted SheetMicrofiber Interlock - 135 GsmPc(s)
23
24
25
26
27
28Bed SetSet(s)
29Duvet CoverPc(s)
30Fitted SheetPc(s)
31Pillow PairPair(s)
32Pillow PcPc(s)
33Side PillowPc(s)
34Terry TowelPc(s)
Year Wise
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,215,195
Messages
6,123,572
Members
449,108
Latest member
rache47

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