BatTodor
New member
- Joined
- Nov 6, 2016
- Messages
- 6
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- 2012 (Build 13530.20376)
Hi all,
Working to prepare database generated from similar information I failed to expand number of columns after each merged workbook.
I build PowerQuery, based on solution read in excelguru's bolg (/blog/2015/02/25/combine-multiple-excel-workbooks-in-power-query/)
In original workbooks I have 9 columns and variable rows (more than 80). The structure of each workbook is like this:
Store | Address of store | Data for Monday | Data for Tuesday | Data for Wednesday | Data for Thursday | Data for Friday | Data for Saturday | Data for Sunday |
I want to remove second column and transpose information, because to have dates on first column and list of stores on other columns.
The number of stores varies.
I was able to merge all workbooks in one database, but still not able to expand it depends of number of stores. Every new store can be in any position. For example:
Workbook 1
Store | Address of store | Date01 | Date02 | Date03 | Date04 | Date05 | Date06 | Date07 |
Store 1 | Address of store 1 | 12 | 14 | 16 | 18 | 20 | 22 | 24 |
Store 2 | Address of store 2 | 13 | 15 | 17 | 19 | 21 | 23 | 25 |
Store 3 | Address of store 3 | 22 | 24 | 26 | 28 | 30 | 32 | 34 |
Store 4 | Address of store 4 | 23 | 25 | 27 | 29 | 31 | 33 | 35 |
Workbook 2
Store | Address of store | Date08 | Date09 | Date10 | Date11 | Date12 | Date13 | Date14 |
Store 1 | Address of store 1 | 32 | 34 | 36 | 38 | 40 | 42 | 44 |
Store 2 | Address of store 2 | 33 | 35 | 37 | 39 | 41 | 43 | 45 |
New Store1 | Address of New store1 | 22 | 24 | 26 | 28 | 30 | 32 | 34 |
Store 3 | Address of store 3 | 42 | 44 | 46 | 48 | 50 | 52 | 54 |
Store 4 | Address of store 4 | 43 | 45 | 47 | 49 | 51 | 53 | 55 |
Workbook 3
Store | Address of store | Date15 | Date16 | Date17 | Date18 | Date19 | Date20 | Date21 |
Store 1 | Address of store 1 | 42 | 44 | 46 | 48 | 50 | 52 | 54 |
Store 2 | Address of store 2 | 43 | 45 | 47 | 49 | 51 | 53 | 55 |
New Store1 | Address of New store1 | 32 | 34 | 36 | 38 | 40 | 42 | 44 |
Store 3 | Address of store 3 | 52 | 54 | 56 | 58 | 60 | 62 | 64 |
New Store2 | Address of New store1 | 72 | 74 | 76 | 78 | 80 | 82 | 84 |
Store 4 | Address of store 4 | 53 | 55 | 57 | 59 | 61 | 63 | 65 |
Merged database need to look like this:
Date | Store 1 | Store 2 | NS1 | Store 3 | NS2 | Store 4 |
Date01 | 12 | 13 | | 22 | | 23 |
Date02 | 14 | 15 | | 24 | | 25 |
Date03 | 16 | 17 | | 26 | | 27 |
Date04 | 18 | 19 | | 28 | | 29 |
Date05 | 20 | 21 | | 30 | | 31 |
Date06 | 22 | 23 | | 32 | | 33 |
Date07 | 24 | 25 | | 34 | | 35 |
Date08 | 32 | 33 | 22 | 42 | | 43 |
Date09 | 34 | 35 | 24 | 44 | | 45 |
Date10 | 36 | 37 | 26 | 46 | | 47 |
Date11 | 38 | 39 | 28 | 48 | | 49 |
Date12 | 40 | 41 | 30 | 50 | | 51 |
Date13 | 42 | 43 | 32 | 52 | | 53 |
Date14 | 44 | 45 | 35 | 54 | | 55 |
Date15 | 42 | 43 | 32 | 52 | 72 | 53 |
Date16 | 44 | 45 | 34 | 54 | 74 | 55 |
Date17 | 46 | 47 | 36 | 56 | 76 | 56 |
Date18 | 48 | 49 | 38 | 58 | 78 | 59 |
Date19 | 50 | 51 | 40 | 60 | 80 | 61 |
Date20 | 52 | 53 | 42 | 62 | 82 | 63 |
Date21 | 54 | 55 | 44 | 64 | 84 | 65 |
Can anybody help me?
Working to prepare database generated from similar information I failed to expand number of columns after each merged workbook.
I build PowerQuery, based on solution read in excelguru's bolg (/blog/2015/02/25/combine-multiple-excel-workbooks-in-power-query/)
In original workbooks I have 9 columns and variable rows (more than 80). The structure of each workbook is like this:
Store | Address of store | Data for Monday | Data for Tuesday | Data for Wednesday | Data for Thursday | Data for Friday | Data for Saturday | Data for Sunday |
I want to remove second column and transpose information, because to have dates on first column and list of stores on other columns.
The number of stores varies.
I was able to merge all workbooks in one database, but still not able to expand it depends of number of stores. Every new store can be in any position. For example:
Workbook 1
Store | Address of store | Date01 | Date02 | Date03 | Date04 | Date05 | Date06 | Date07 |
Store 1 | Address of store 1 | 12 | 14 | 16 | 18 | 20 | 22 | 24 |
Store 2 | Address of store 2 | 13 | 15 | 17 | 19 | 21 | 23 | 25 |
Store 3 | Address of store 3 | 22 | 24 | 26 | 28 | 30 | 32 | 34 |
Store 4 | Address of store 4 | 23 | 25 | 27 | 29 | 31 | 33 | 35 |
Workbook 2
Store | Address of store | Date08 | Date09 | Date10 | Date11 | Date12 | Date13 | Date14 |
Store 1 | Address of store 1 | 32 | 34 | 36 | 38 | 40 | 42 | 44 |
Store 2 | Address of store 2 | 33 | 35 | 37 | 39 | 41 | 43 | 45 |
New Store1 | Address of New store1 | 22 | 24 | 26 | 28 | 30 | 32 | 34 |
Store 3 | Address of store 3 | 42 | 44 | 46 | 48 | 50 | 52 | 54 |
Store 4 | Address of store 4 | 43 | 45 | 47 | 49 | 51 | 53 | 55 |
Workbook 3
Store | Address of store | Date15 | Date16 | Date17 | Date18 | Date19 | Date20 | Date21 |
Store 1 | Address of store 1 | 42 | 44 | 46 | 48 | 50 | 52 | 54 |
Store 2 | Address of store 2 | 43 | 45 | 47 | 49 | 51 | 53 | 55 |
New Store1 | Address of New store1 | 32 | 34 | 36 | 38 | 40 | 42 | 44 |
Store 3 | Address of store 3 | 52 | 54 | 56 | 58 | 60 | 62 | 64 |
New Store2 | Address of New store1 | 72 | 74 | 76 | 78 | 80 | 82 | 84 |
Store 4 | Address of store 4 | 53 | 55 | 57 | 59 | 61 | 63 | 65 |
Merged database need to look like this:
Date | Store 1 | Store 2 | NS1 | Store 3 | NS2 | Store 4 |
Date01 | 12 | 13 | | 22 | | 23 |
Date02 | 14 | 15 | | 24 | | 25 |
Date03 | 16 | 17 | | 26 | | 27 |
Date04 | 18 | 19 | | 28 | | 29 |
Date05 | 20 | 21 | | 30 | | 31 |
Date06 | 22 | 23 | | 32 | | 33 |
Date07 | 24 | 25 | | 34 | | 35 |
Date08 | 32 | 33 | 22 | 42 | | 43 |
Date09 | 34 | 35 | 24 | 44 | | 45 |
Date10 | 36 | 37 | 26 | 46 | | 47 |
Date11 | 38 | 39 | 28 | 48 | | 49 |
Date12 | 40 | 41 | 30 | 50 | | 51 |
Date13 | 42 | 43 | 32 | 52 | | 53 |
Date14 | 44 | 45 | 35 | 54 | | 55 |
Date15 | 42 | 43 | 32 | 52 | 72 | 53 |
Date16 | 44 | 45 | 34 | 54 | 74 | 55 |
Date17 | 46 | 47 | 36 | 56 | 76 | 56 |
Date18 | 48 | 49 | 38 | 58 | 78 | 59 |
Date19 | 50 | 51 | 40 | 60 | 80 | 61 |
Date20 | 52 | 53 | 42 | 62 | 82 | 63 |
Date21 | 54 | 55 | 44 | 64 | 84 | 65 |
Can anybody help me?