J
Jeff J
I have a range of cells containing a classification, e.g.
1, 2, 3 or 4. I have a macro to sort the cells based on
classification, now I'm trying to create a formula that
will allow me to find the first cell and the last cell
(cell addresses) containing, for example "2" in range J3-
J1000 in another workbook. I fixed the syntax of the
formula, but I get an N/A.
Is my approach feasible, do I have the formula structured
incorrectly or have I encountered a limitation in Excel?
The basic formula works, but I encounter the problem when
I try to integrate the INDIRECT function.
Here is the setup:
B C
1 Workbook.xls J3
2 Sheet1 J1000
3 "2"
Formula for first occurance of "2":
=CELL("address",INDEX(INDIRECT
("'["&$B1&"]"&$B2&"'!"&$C1&":"&$C2),MATCH(B3,(INDIRECT
("'["&$B1&"]"&$B2&"'!"&$C1&":"&$C2)),0)))
The formula for the last occurance is the same, except
the 0 becomes 1.
Any thoughts/fixes/comments would be greatly appreciated.
Thanks,
Jeff
1, 2, 3 or 4. I have a macro to sort the cells based on
classification, now I'm trying to create a formula that
will allow me to find the first cell and the last cell
(cell addresses) containing, for example "2" in range J3-
J1000 in another workbook. I fixed the syntax of the
formula, but I get an N/A.
Is my approach feasible, do I have the formula structured
incorrectly or have I encountered a limitation in Excel?
The basic formula works, but I encounter the problem when
I try to integrate the INDIRECT function.
Here is the setup:
B C
1 Workbook.xls J3
2 Sheet1 J1000
3 "2"
Formula for first occurance of "2":
=CELL("address",INDEX(INDIRECT
("'["&$B1&"]"&$B2&"'!"&$C1&":"&$C2),MATCH(B3,(INDIRECT
("'["&$B1&"]"&$B2&"'!"&$C1&":"&$C2)),0)))
The formula for the last occurance is the same, except
the 0 becomes 1.
Any thoughts/fixes/comments would be greatly appreciated.
Thanks,
Jeff