Hi All,I'm searching for a VBA approach to do a lookup.I want to search for a cell value in a column, and return the next 2 adjacent values (columns B&C) to the right of the search. Some cell values have MULTIPLE matches, and I'm looking to see how I can auto add rows underneath and return all sets of adjacent values (2 rows added underneath for 3 matches, 1 underneath for 2 matches, etc....)
Specific Example:
I want to search for the value in "Sheet1", cell A2 in "Sheet2", column A.
Hypothetically, lets say the matches in "Sheet2" lay in cell A7, A8, A9.
In "Sheet1" I want cell B2 and C2 to contain the adjacent values, and 2 rows added underneath so cells B3:C3, and B4:C4 can contain the other 2 matches' adjacent values.
Please let me know if I can clarify further. Thanks!!!
Specific Example:
I want to search for the value in "Sheet1", cell A2 in "Sheet2", column A.
Hypothetically, lets say the matches in "Sheet2" lay in cell A7, A8, A9.
In "Sheet1" I want cell B2 and C2 to contain the adjacent values, and 2 rows added underneath so cells B3:C3, and B4:C4 can contain the other 2 matches' adjacent values.
Please let me know if I can clarify further. Thanks!!!