RoguePotatoes
New member
- Joined
- Jul 10, 2019
- Messages
- 5
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- 2019 (x64)
Using Get from Folder I have consolidated about 2,000 Work Order forms that were made in excel. The overall look of the form is generally the same but unfortunately the template has a few variations and the data isn't always put in the exact same cell, but its always in the same general area, usually within a cell or two away. So I transformed one worksheet into a single row of data and used it as a function to create a query with 38 columns and over 2,000 rows, each row being a single form worth of data (including titles and some other info I don't need). But of course some of the data doesn't line up with the rest.
My question is, is there a way to move or rearrange the columns of specific rows only, without affecting the rows whose data is in the right place/order?
I have tried writing my own M code to do this with records and transforming fields. I have tried selecting and rearranging columns:
but I can't get anything to work so far. I can upload an example if that helps, I'd just have to change sensitive data.
My question is, is there a way to move or rearrange the columns of specific rows only, without affecting the rows whose data is in the right place/order?
I have tried writing my own M code to do this with records and transforming fields. I have tried selecting and rearranging columns:
Code:
Custom1 = Table.ReorderColumns( Table.SelectRows( #"Filtered Rows", each [Column1] = "CUSTOMER:"), {"Column2", "Column1"}),
#"Renamed Columns" = Table.RenameColumns(Custom1,{{"Column1", "Column2"}, {"Column2", "Column1"}}),
#"Append" = Custom1 & Table.SelectRows( #"Filtered Rows", each [Column1] <> "CUSTOMER:"),
but I can't get anything to work so far. I can upload an example if that helps, I'd just have to change sensitive data.