Search for this on or the closest value in Sheet1 range CB2:DD3Rows 2 and 3 contain very different kinds of data. Do you mean CB2:DD2?
If value foundVBA would like to know what if it isn't found. In fact, is it possible that it isn't found? Blank cells would have a value of zero and zero could be the closest to any other number. Do you need to differentiate between zero and nothing?
look at column values in CA of the row found in, use this as the second criteriaThe first look-up returned a column. The row of that column is row 2. Therefore the return value would always be CA2, right?
Search Sheet3 in range W2:A2 for the second criteriaThis range is blank in your workbook.
Then paste all the values in the respective columnsNow, that is a tall order! Which values? To which columns? On which sheet?
If multiple 17's, then use the first match. First look to the newest, then if not found go to the oldestI presume that the newest would be the furthest to the right. Therefore my program starts looking from the right and finds CX as the first occurrence of the nearest match.
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.