Ok, the formula would actually be ..
=INDIRECT(LEFT(MID(CELL("filename"),FIND("]",CELL("filename"),1)+1,LEN(CELL("filename"))-FIND("]",CELL("filename"),1)+1),5)&"B"&RIGHT(MID(CELL("filename"),FIND("]",CELL("filename"),1)+1,LEN(CELL("filename"))-FIND("]",CELL("filename"),1)+1),1)&"!B1")
This takes into account the last digit changing. You could shorten this by putting the filename (sheet) formula into another cell..
Well, the CELL("filename") formula will return the entire FullName (vba) of the workbook in which the formula is placed. To break the formula down we can look at ..
=INDIRECT(
Will evaluate the current sheet name - only B, not A - explained further..
LEFT(
This is taking the first part of the sheet name returned. (If only going be be Sheetxx, you can actually make this much shorter.) So starting from the far Left of our value, we're going x amount of spaces to the right of the value we're going to return.
MID(CELL("filename"),
Were going to go in the middle of the entire filename to retrieve the sheet name - you can also use RIGHT, it's just another way. We use the MID because you're wanting it to be broken up (basically).
FIND("]",CELL("filename"),1)+1,
Go one space to the right after the filename ([Book1.xls]), which is the first char of the sheet name.
LEN(CELL("filename"))-FIND("]",CELL("filename"),1)+1),5)
This will find the LENgth of the filename, and minus the number of characters that are prior to the sheet name, resulting in only the first 5 characters of it.
&"B"&
This will *hardcode* "B" in your sheet name, so it always refers to that sheet.
RIGHT(
This is the start of finding what sheet number you are in, e.g. SheetA1, Sheet A2, etc.
MID(CELL("filename"),FIND("]",CELL("filename"),1)+1,LEN(CELL("filename"))-FIND("]",CELL("filename"),1)+1),1)
Same formula used above, this will be looking at the current sheet name. Only this time, we're performing the RIGHT function on it.
&"!B1")
*Hardcodes* cell B1 of said sheet into formula.
HTH