Returning cell value in sheet referenced in another cell.

%3CLINGO-SUB%20id%3D%22lingo-sub-3359550%22%20slang%3D%22en-US%22%3EReturning%20cell%20value%20in%20sheet%20referenced%20in%20another%20cell.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3359550%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20very%20much%20a%20rookie%20with%20excel%20and%20was%20hoping%20someone%20can%20help%20with%20the%20following.%26nbsp%3B%20I'm%20trying%20to%20return%20the%20value%20of%20a%20cell%20from%20a%20sheet.%26nbsp%3B%20As%20in%20the%20image%20below%2C%20I've%20simply%20put%20%22%3D%22%20then%20clicked%20on%20the%20cell%20in%20another%20sheet%20I%20want%20the%20value%20from.%26nbsp%3B%20However%2C%20I%20want%20the%20file%20it%20takes%20the%20value%20from%20to%20be%20based%20on%20the%20cell%20on%20the%20left%20e.g%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3D%5BB3%5DSheet1!%24C%245%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWithout%20going%20into%20detail%2C%20the%20value%20is%20in%20the%20same%20cell%20on%20each%20file%20as%20they%20are%20filed%20separately%20for%20each%20day.%26nbsp%3B%20The%20aim%20would%20be%20to%20simply%20pull%20the%20formula%20down%20and%20it%20takes%20each%20file%20name%20on%20the%20left%20and%20returns%20the%20cell%20from%20each.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Marcus_Grant_1-1652289626048.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F370866i34CA5DEF7055FB1E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Marcus_Grant_1-1652289626048.png%22%20alt%3D%22Marcus_Grant_1-1652289626048.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20would%20be%20greatly%20appreciated!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3359550%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3360276%22%20slang%3D%22en-US%22%3ERe%3A%20Returning%20cell%20value%20in%20sheet%20referenced%20in%20another%20cell.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3360276%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1387351%22%20target%3D%22_blank%22%3E%40Marcus_Grant%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20use%20the%20INDIRECT%20function%20for%20this%2C%20BUT%20(and%20this%20is%20a%20big%20BUT!)%20it%20will%20only%20work%20if%20all%20the%20workbooks%20referred%20to%20(1.xlsx%20etc.)%20is%20also%20open%20in%20Excel.%20If%20they%20are%20closed%2C%20the%20formula%20will%20return%20%23REF!%3C%2FP%3E%0A%3CP%3EIn%20C3%3A%3C%2FP%3E%0A%3CP%3E%3DINDIRECT(%22'%5B%22%26amp%3BB3%26amp%3B%22%5DSheet1'!C5%22)%3C%2FP%3E%0A%3CP%3EFill%20down.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3360778%22%20slang%3D%22en-US%22%3ERe%3A%20Returning%20cell%20value%20in%20sheet%20referenced%20in%20another%20cell.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3360778%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1387351%22%20target%3D%22_blank%22%3E%40Marcus_Grant%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESlightly%20modified%20formula%20suggested%20by%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%26nbsp%3B%20if%20get%20value%20from%20the%20same%20cell%20in%20another%20workbook%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DINDIRECT(%22'%5B%22%20%26amp%3B%20%24B3%20%26amp%3B%20%22%5DSheet1'!%22%20%26amp%3B%20CELL(%22address%22))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20to%20keep%20all%20files%20opened%20is%20not%20the%20case%20perhaps%20it%20could%20be%20workaround%20with%20VBA%20or%20Power%20Query.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3362270%22%20slang%3D%22en-US%22%3ERe%3A%20Returning%20cell%20value%20in%20sheet%20referenced%20in%20another%20cell.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3362270%22%20slang%3D%22en-US%22%3EHi%20Hans%2C%3CBR%20%2F%3EThe%20but%20is%20big%20unfortunately%20but%20I%20really%20appreciate%20the%20help!%20I%20may%20be%20able%20to%20open%20each%20as%20they're%20saved%20and%20essentially%20manually%20update%20it.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3362303%22%20slang%3D%22en-US%22%3ERe%3A%20Returning%20cell%20value%20in%20sheet%20referenced%20in%20another%20cell.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3362303%22%20slang%3D%22en-US%22%3EMuch%20appreciated%2C%20I've%20only%20just%20heard%20of%20power%20query%20but%20seems%20like%20there%20will%20be%20lots%20of%20uses%20so%20will%20definitely%20look%20into%20that!%3C%2FLINGO-BODY%3E
New Contributor

Hi,

 

I'm very much a rookie with excel and was hoping someone can help with the following.  I'm trying to return the value of a cell from a sheet.  As in the image below, I've simply put "=" then clicked on the cell in another sheet I want the value from.  However, I want the file it takes the value from to be based on the cell on the left e.g

 

=[B3]Sheet1!$C$5

 

Without going into detail, the value is in the same cell on each file as they are filed separately for each day.  The aim would be to simply pull the formula down and it takes each file name on the left and returns the cell from each.

 

Marcus_Grant_1-1652289626048.png

 

Any help would be greatly appreciated!

 

4 Replies

@Marcus_Grant 

You can use the INDIRECT function for this, BUT (and this is a big BUT!) it will only work if all the workbooks referred to (1.xlsx etc.) is also open in Excel. If they are closed, the formula will return #REF!

In C3:

=INDIRECT("'["&B3&"]Sheet1'!C5")

Fill down.

@Marcus_Grant 

Slightly modified formula suggested by @Hans Vogelaar  if get value from the same cell in another workbook

=INDIRECT("'[" & $B3 & "]Sheet1'!" & CELL("address"))

 

If to keep all files opened is not the case perhaps it could be workaround with VBA or Power Query.

Hi Hans,
The but is big unfortunately but I really appreciate the help! I may be able to open each as they're saved and essentially manually update it.
Much appreciated, I've only just heard of power query but seems like there will be lots of uses so will definitely look into that!