Hello I wondered if you could help. I have just started to learn how to use VBA to help with data management in excel. I'm using excel office 365 on windows 10.
I managed to create a macro that processes the raw data into a pivot table filtered to a set format (lets call this sheet 1). Within sheet 1 on the pivot table from A7 (excluding the header) there is a list of unique IDs and numerous associated rows of information (the number of rows and columns will always vary). On another worksheet (lets call this sheet 2) I have another list of reference IDs from A2 to A90 (excluding the header), the range is fixed. The problem i have is i only want the rows of information associated with the unique IDs listed on sheet 2 which match the unique IDs listed on sheet 1 of the Pivot table. To simplify, I need to extract the rows of data on sheet 1 from the pivot table, where the unique IDs match the IDs on sheet 2. If a reference ID on sheet 2 does not match any unique ID on sheet 1 then that row on sheet two should be left blank. The process would continue until excel has gone through the entire list of reference IDs on sheet 2 and extracted the rows from the pivot table on sheet 1, whenever a match has been found. The order the reference IDs are placed in sheet 2 is important, as the order is set.
I've attached some snapshots to hopefully help with explaining things a bit better.
I would be incredibly grateful in getting your help with a VBA code that can achieve this goal.
Mario
I managed to create a macro that processes the raw data into a pivot table filtered to a set format (lets call this sheet 1). Within sheet 1 on the pivot table from A7 (excluding the header) there is a list of unique IDs and numerous associated rows of information (the number of rows and columns will always vary). On another worksheet (lets call this sheet 2) I have another list of reference IDs from A2 to A90 (excluding the header), the range is fixed. The problem i have is i only want the rows of information associated with the unique IDs listed on sheet 2 which match the unique IDs listed on sheet 1 of the Pivot table. To simplify, I need to extract the rows of data on sheet 1 from the pivot table, where the unique IDs match the IDs on sheet 2. If a reference ID on sheet 2 does not match any unique ID on sheet 1 then that row on sheet two should be left blank. The process would continue until excel has gone through the entire list of reference IDs on sheet 2 and extracted the rows from the pivot table on sheet 1, whenever a match has been found. The order the reference IDs are placed in sheet 2 is important, as the order is set.
I've attached some snapshots to hopefully help with explaining things a bit better.
I would be incredibly grateful in getting your help with a VBA code that can achieve this goal.
Mario