I need a vba excel macro to transpose and sort columns in to rows.
Saple file before transpose:
Sheet 1
------B----------------------C------------------D--------------------E----------------F--------------------G
3----Stock Number-- ------Product ----------Units---------------Room----------Available----------Sum
4----PE22------------------Pen---------------- Pieces ------------R09-------------6---------------------11
5--------------------------------------------------------------------R01-------------3
6--------------------------------------------------------------------R22-------------2
7 Blank row
8----PE25---------------------Pencil-------------- Pieces --------------------------------------------------------
9----C13----------------------Chair----------------Pieces---------R22-------------3----------------------10
10-------------------------------------------------------------------R05-------------2
11-------------------------------------------------------------------R04-------------3
12-------------------------------------------------------------------R01-------------2
13---T05----------------------Computer-----------Pieces---------R02-------------1-----------------------1
14 Blank row
15 Blank row
Note: There are tens of thousands of lines, thousands of products, hundreds of rooms.
Output samle file:
Sheet2
----A --------------B-----------------C----------D--------E------F-------G-------H------I-------J------K
4---Line Nmr.---Stock Nmr.--------Product---Units----R01---R02----R04----R05---R09--- R22-- Sum
5---1-------------- PE22------------ Pen------- Pieces---3------------------------------6------2------11
6---2-------------- C13--------------Chair----- Pieces---2--------------3--------2-------------3------10
7---3-------------- T05-------------Computer- Pieces-----------1---------------------------------------1
Note 1: Pencil doesn’t transpose to sheet2. Because there isn’t any pencil in any room.
Note 2 : The rooms must be sorted.
Any help would be most appreciated!
Saple file before transpose:
Sheet 1
------B----------------------C------------------D--------------------E----------------F--------------------G
3----Stock Number-- ------Product ----------Units---------------Room----------Available----------Sum
4----PE22------------------Pen---------------- Pieces ------------R09-------------6---------------------11
5--------------------------------------------------------------------R01-------------3
6--------------------------------------------------------------------R22-------------2
7 Blank row
8----PE25---------------------Pencil-------------- Pieces --------------------------------------------------------
9----C13----------------------Chair----------------Pieces---------R22-------------3----------------------10
10-------------------------------------------------------------------R05-------------2
11-------------------------------------------------------------------R04-------------3
12-------------------------------------------------------------------R01-------------2
13---T05----------------------Computer-----------Pieces---------R02-------------1-----------------------1
14 Blank row
15 Blank row
Note: There are tens of thousands of lines, thousands of products, hundreds of rooms.
Output samle file:
Sheet2
----A --------------B-----------------C----------D--------E------F-------G-------H------I-------J------K
4---Line Nmr.---Stock Nmr.--------Product---Units----R01---R02----R04----R05---R09--- R22-- Sum
5---1-------------- PE22------------ Pen------- Pieces---3------------------------------6------2------11
6---2-------------- C13--------------Chair----- Pieces---2--------------3--------2-------------3------10
7---3-------------- T05-------------Computer- Pieces-----------1---------------------------------------1
Note 1: Pencil doesn’t transpose to sheet2. Because there isn’t any pencil in any room.
Note 2 : The rooms must be sorted.
Any help would be most appreciated!