I need some help in writing a macro for the below:
1. In sheet 1, I have column A with a list of items and many of them will be repetitive, Column B with the current cost for the item. we have column C and D that need to be filled with values from sheet 2
2. Sheet 2. Column A contains the same list of items from column A in sheet 1 but this time it is unique. It is not repetitive. Each items have the cost per month. So column B (header: Jan 2015) has values for month of Jan, Column C (header name Feb 2015) has values for month of Feb and so on.
3. Now I need to look up the value from Cell A2 in sheet 1 with the range column A in sheet 2. Once we look up the value in cell A2 use that row. From that row find the value that is greater that value on Cell B2 in sheet 1 and appears first. For example if value of B2 is 5, we need to find the value greater than 5 in the row we found using first lookup.
4. Once we found the value greater than cell B2 in sheet 1, we need to get that value in Column C in sheet 1
5. The last step is to get the column header of the first greatest value and bring it in column D in sheet 1