Hello all,
I am new in programming with VBA. I have used this Forum before to help me solve some simple macros and it has been really helpful.
However, right now I am doing a Task that is too complicated for my Level. I hope you can help me, if not to solve the Problem, at least to guide me to find the solution.
I will try to describe the Task as clear as possible:
I have two workbooks: A and B, with only 1 sheet each
I have made some Research and found similar Threads regarding arragement of columns, but they are usually arranged in relation to a "fixed" order specify in the code itself and not in relation to the values of another Workbook (whose headers do not even match).
arrColOrder = Array("COLUMN2", "COLUMN4", "COLUMN6", "COLUMN10", "COLUMN1")
https://www.mrexcel.com/forum/excel-questions/606890-reorder-columns-using-macro.html
could you help me or give me advice for this problem? at least to know in which direction I should go or what functions should be useful.
Thank you very much in advance!
I am new in programming with VBA. I have used this Forum before to help me solve some simple macros and it has been really helpful.
However, right now I am doing a Task that is too complicated for my Level. I hope you can help me, if not to solve the Problem, at least to guide me to find the solution.
I will try to describe the Task as clear as possible:
I have two workbooks: A and B, with only 1 sheet each
- Workbook A is the "master" and its columns headers are in English (Quantity, Colour, Name, Component, Status..etc).
- Workbook B is the file whose columns will be re-arrange in relation to the master's. Such columns are not in the same order than in the "master" and the headers are the literal Translation to spanish (Cantidad, Estado, Componente, Nombre...etc)
- Workbook A (master) has some columns that are not in B, like "Colour". For this situations, my macro should be able to identify that there is not column matching, and insert a blank column in its place.
I have made some Research and found similar Threads regarding arragement of columns, but they are usually arranged in relation to a "fixed" order specify in the code itself and not in relation to the values of another Workbook (whose headers do not even match).
arrColOrder = Array("COLUMN2", "COLUMN4", "COLUMN6", "COLUMN10", "COLUMN1")
https://www.mrexcel.com/forum/excel-questions/606890-reorder-columns-using-macro.html
could you help me or give me advice for this problem? at least to know in which direction I should go or what functions should be useful.
Thank you very much in advance!