I need to extract information from Sheet1 and put it on Sheet2. The report for Sheet1 is never the same. I need to extract information from each column separately, based on values in one or more cells and put the results on Sheet2. The Values that I want to reference to never changes, except that they might not be there if the equipment did not run. Also need to search on each column separately, so I do not combine the results.
I have 4 different, but similar examples and need each to have its own Macro:
1) In this scenario I want to search for the values ADAM, Break, 15, and PCS will always be there, values Break, 15, and PCS will always follow in that order next to each other. In Column A there is ADAM in cell “A3” identifying the equipment, in column “A21” is Break, value never changes, location in column does. In column “A22” is 15, below that in “A23” is PCS, in “A24” is 15275(that value changes) and is what I need to copy to Sheet2 in a cell location that never changes. Next in cell “A28” is Thpt, that value never changes and in cell “A29” is 8825, that value changes and I need to copy it to Sheet2 in a cell location that never changes.
2) In this scenario I want to search for the values ADAM200, Break, 4, 7, and PCS will always be there, values Break, 4, 7, and PCS will always follow in that order next to each other. In Column A there is ADAM200 in cell “A69” identifying the equipment, in column “A152” is Break again, value never changes, location in column does. In column “A171 & A172” is 4 & 7 that order, below that in “A173” is PCS, in “A174” is 97149(that value changes) and is what I need to copy to Sheet2 in a cell location that never changes. Next in cell “A183” is Thpt, that value never changes and in cell “A184” is 20264, that value changes and I need to copy it to Sheet2 in a cell location that never changes. Note in “A178” is Pcs and “A188” is Thpt, I need to ignore them.
3) In this scenario I want to search for the values ARIAL300, 146P0002, JOB 146, and Break, will always be there, I need to search between the values ARIAL300, and Break. I need to find 146P0002 at “A236” and Job 146 at “A238”, will never be in the same location but will always be one cell apart in that order. I need to copy the values from cells “A237” and “A240”, which is always located in the same cells in reference to 146P0002 and Job 146 to Sheet2 in a cell location that never changes.
4) In this scenario I want to search for the values ARIAL300, 143P0022, JOB 143, and Break, will always be there, I need to search between the values ARIAL300, and Break. I need to find 143P0022 at “C380” and Job 143 at “C382”, will never be in the same location but will always be one cell apart in that order. I need to copy the values from cells “C381” and “C383”, which is always located in the same cells in reference to 143P0022 and Job 143 to Sheet2 in a cell location that never changes. The only additional thing may happen is there could be more than one instance of values 143P0022 and Job 143 between ARIAL300, and Break. In that case I need to sum the values together. Like “C381”(17,177 Pcs), “C386”(115 Pcs), “C438”(31,069 Pcs), “C443”(28,340 Pcs), & “C448”(3,074 Pcs) Totaling 79775, Next I need to total the time from cells “C383”(1:33:45), “C388”(0:06:49), “C440”(2:57:09), “C445”(3:48:10), & “C450”(0:46:40) totaling 33,153 seconds. Then divide 79775 by 33153 and multiply it by 3600, equaling 8662.56447, then round it off to 8663 P/Hr. Note: If I try to average the times any other way it does not match the original report.
Bookmarks