brooklyn2007
Board Regular
- Joined
- Nov 20, 2010
- Messages
- 143
Hello,
I have this situation. I have two sheets. One is called Raw Data that contains a table from A to G. A is Product Id and B is Product Name. Cell E are stock quantities and cell G Wareouse. I want a Vba code to first take all IDs and Names of products in this sheet and post them accordingly below cell A4 and B4 in sheet Final report. Cells in range A and B in Raw Data repeat themselves. Final result should not post duplicates. Also final result should take only those rows of cells that contain one of the names in range D4 to G4 and look in range G in sheet Raw Data and post them below cells A4 and B4 in sheet Final report. Then it has to populate with values all range from D4 to G till the last of rows in sheet Final report. To lookup, values are located in column E in sheet Raw Data (stock quantities). it has to do a match by looking Product Id and header in rows D4 to G4 in sheet Final report and post the value taken in column E in sheet Raw Data. I know it can be done with pivot but I have so many Warehouses names.
This is the view of sheet Final report where data is needed
This is the view of Raw Data where data is taken
I have this situation. I have two sheets. One is called Raw Data that contains a table from A to G. A is Product Id and B is Product Name. Cell E are stock quantities and cell G Wareouse. I want a Vba code to first take all IDs and Names of products in this sheet and post them accordingly below cell A4 and B4 in sheet Final report. Cells in range A and B in Raw Data repeat themselves. Final result should not post duplicates. Also final result should take only those rows of cells that contain one of the names in range D4 to G4 and look in range G in sheet Raw Data and post them below cells A4 and B4 in sheet Final report. Then it has to populate with values all range from D4 to G till the last of rows in sheet Final report. To lookup, values are located in column E in sheet Raw Data (stock quantities). it has to do a match by looking Product Id and header in rows D4 to G4 in sheet Final report and post the value taken in column E in sheet Raw Data. I know it can be done with pivot but I have so many Warehouses names.
This is the view of sheet Final report where data is needed
This is the view of Raw Data where data is taken