i have a sheet with data (sheet1) and i need a formula that can look in sheet1 column A for a number that can be found in sheet2 cell A1 (the number is 1103)
in sheet1 column A, the number 1103 appears several times and i need excel to find/look up the last 5 times that number (1103) appears and return the entire row (row1 in sheet1) into sheet2 next to where i have typed 1103.
so to specify a little
in sheet2, in cell A1-A5, is the number 1103 and i need the rest of the cells in sheet2 (A2:A20) to look into sheet1 column A for the latest 5 entries of the number 1103 (where 1103 is in the highest row number (if it is in row 1-5, 10-15, 25-30) it must return the values from sheet1 row 25-30) to sheet2 row1-5
also i sheet 2 i would need the same as above for other numbers (1257) but only the latest 2 entries, and also for several other numbers but if i can get the formula correct, then i can just adjust the number to look for and the number of rows to get data from.
so far i have been using {=INDEX(A1:A790;(MAX((A1:A790<>"")*ROW(A1:A790)))-ROW(A1)+1)} (ending with ctrl+shift+enter)
to return the last value in column A but i need some helt to get the formula to look for the last entrance of 1103 and return corresponding row. maybe this formula is no good for what i'm trying to do?
maybe i need to combine this with vlookup and/or indirect ?
thanks.
in sheet1 column A, the number 1103 appears several times and i need excel to find/look up the last 5 times that number (1103) appears and return the entire row (row1 in sheet1) into sheet2 next to where i have typed 1103.
so to specify a little
in sheet2, in cell A1-A5, is the number 1103 and i need the rest of the cells in sheet2 (A2:A20) to look into sheet1 column A for the latest 5 entries of the number 1103 (where 1103 is in the highest row number (if it is in row 1-5, 10-15, 25-30) it must return the values from sheet1 row 25-30) to sheet2 row1-5
also i sheet 2 i would need the same as above for other numbers (1257) but only the latest 2 entries, and also for several other numbers but if i can get the formula correct, then i can just adjust the number to look for and the number of rows to get data from.
so far i have been using {=INDEX(A1:A790;(MAX((A1:A790<>"")*ROW(A1:A790)))-ROW(A1)+1)} (ending with ctrl+shift+enter)
to return the last value in column A but i need some helt to get the formula to look for the last entrance of 1103 and return corresponding row. maybe this formula is no good for what i'm trying to do?
maybe i need to combine this with vlookup and/or indirect ?
thanks.