Home

Cells referencing other cells in another worksheet.

%3CLINGO-SUB%20id%3D%22lingo-sub-487844%22%20slang%3D%22en-US%22%3ECells%20referencing%20other%20cells%20in%20another%20worksheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-487844%22%20slang%3D%22en-US%22%3E%3CP%3EHi.%20I%20need%20some%20help%20with%20cells%20referencing%20other%20cells%20in%20another%20worksheet.%3CSPAN%20class%3D%22Apple-converted-space%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThe%20initial%20setup%20works%20fine.%20For%20example%20the%20first%20worksheet%20has%26nbsp%3Ba%20column%20containing%20the%20alphabet%20in%20order.%20I%20reference%20those%20cells%20in%20another%20worksheet%20so%20I%20get%20another%20identical%20alphabet%20column.%20I%20go%20back%20to%20the%20first%20worksheet%20and%20mess%20about%20with%20the%20order%20of%20the%20letters.%20E.g.%20add%20a%20blank%20row%20somewhere%3B%20move%20a%20row%20further%20down%20the%20sheet%20somewhere%20etc.%3CSPAN%20class%3D%22Apple-converted-space%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EWhen%20I%20go%20to%20the%20second%20worksheet%20again%2C%20all%20the%20dynamic%20referencing%20is%20maintained%20so%20my%20alphabet%20is%20still%20in%20the%20correct%20order.%20So%20far%20so%20good.%3C%2FP%3E%3CP%3EBut%20when%20I%20now%20sort%20the%20first%20worksheet%20back%20into%20alphabetical%20order%20(using%20the%20data%20sort%20utility)%20the%20dynamic%20referencing%20in%20the%20second%20worksheet%20is%20lost%20and%20the%20alphabet%20is%20now%20all%20out%20of%20sequence%20(as%20though%20I%20had%20used%20fixed%20referencing%20with%20%24%20signs).%20How%20do%20I%20preserve%20the%20dynamic%20referencing%20without%20having%20to%20perform%20the%20sort%20manually%3F%20Any%20ideas%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-487844%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-488003%22%20slang%3D%22en-US%22%3ERe%3A%20Cells%20referencing%20other%20cells%20in%20another%20worksheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-488003%22%20slang%3D%22en-US%22%3ESorry%3B%20by%20dynamic%20and%20fixed%20referencing%20I%20meant%20'relative'%20and%20'absolute'.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-488774%22%20slang%3D%22en-US%22%3ERe%3A%20Cells%20referencing%20other%20cells%20in%20another%20worksheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-488774%22%20slang%3D%22en-US%22%3EYou%20have%20to%20extract%20the%20alphabets%20in%20Sheet1%20to%20Sheet%202%20and%20sort%20them%20in%20ascending%20order.%20For%20example%2C%20your%20column%20labels%20in%20both%20Sheets%20are%20in%20Row%201%20and%20your%20data%20begins%20in%20Row%202%2C%20the%20formula%20in%20Sheet2!A2%2C%20copied%20down%20rows%2C%20is%3A%3CBR%20%2F%3E%3DIFERROR(LOOKUP(2%2C1%2F(COUNTIF(Alphabets%2C%22%26gt%3B%3D%22%26amp%3BAlphabets)%3DMAX(INDEX(%3CBR%20%2F%3ECOUNTIF(Alphabets%2C%22%26gt%3B%3D%22%26amp%3BAlphabets)*(COUNTIF(A%241%3AA1%2CAlphabets)%3D0)%2C0)))%2C%3CBR%20%2F%3EAlphabets)%2C%22%22)%3CBR%20%2F%3EIn%20the%20foregoing%20formula%2C%20Alphabets%20is%20a%20range%20name%20defined%20as%3A%3CBR%20%2F%3E%3DSheet1!%24A%242%3AINDEX(Sheet1!%24A%3A%24A%2CCOUNTA(Sheet1!%24A%3A%24A))%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-489096%22%20slang%3D%22en-US%22%3ERe%3A%20Cells%20referencing%20other%20cells%20in%20another%20worksheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-489096%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWow%20it%20works!%26nbsp%3BThank%20you!%3C%2FP%3E%3CP%3EBut%20it's%20all%20magic%20to%20me.%20I%20was%20looking%20for%20something%20much%20simpler%20since%20I%20would%20struggle%20to%20fix%20it%20if%20I%20need%20to%20modify%20it%20for%20any%20reason.%3C%2FP%3E%3CP%3ETo%20be%20honest%2C%20I%20usually%20use%20%22Numbers%22%20on%20my%20Mac%20but%20I%20had%20the%20same%20problem%20there.%20%26nbsp%3BAnd%20the%20Apple%3C%2FP%3E%3CP%3EHelp%20desk%20couldn't%20help%20me%20but%20thought%20the%20Numbers%20software%20needed%20to%20be%20fixed%20(they%20could%20be%20scratching%20their%20heads%20right%20now!)%3C%2FP%3E%3CP%3EHence%20I%20am%20on%20a%20free%20trial%20of%20MS%20Office%20Excel%20system.%20%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20I%20am%20doing%20is%20using%20spreadsheets%20as%20a%20simple%20relational%20database%2C%20each%20sheet%20representing%20a%20normalised%20table.%20And%20I%20was%20getting%20on%20fine%20until%20I%20ran%20into%20this%20problem.%20I%20don't%20think%20I%20can%20transplant%20your%20solution%20to%20Numbers%20because%20it%20doesn't%20seem%20to%20support%20Range%20Names%20for%20a%20start.%3C%2FP%3E%3CP%3EMy%20other%20option%20is%20to%20use%20MS%20Access%20or%20SQLite%20on%20the%20Mac%20but%20I%20think%20the%20learning%20curve%20might%20be%20too%20steep%20at%20my%20age!%3C%2FP%3E%3CP%3ESo%20for%20now%2C%20I%20am%20just%20heading%20up%20each%20relevant%20sheet%20with%20'Do%20Not%20Sort!'.%20For%20example%20it%20would%20have%20been%20nice%20to%20sort%20a%20'person'%20table%20by%20either%20surname%20or%20first%20name%2C%20but%20I%20would%20always%20have%20to%20'Undo%20Sort%22%20to%20maintain%20data%20integrity.%26nbsp%3B%3C%2FP%3E%3CP%3ELet%20me%20know%20if%20you%20think%20of%20any%20simpler%20ways%20of%20achieving%20this%20objective.%3C%2FP%3E%3CP%3EThanks%20again.%3C%2FP%3E%3CP%3EJohn%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-489193%22%20slang%3D%22en-US%22%3ERe%3A%20Cells%20referencing%20other%20cells%20in%20another%20worksheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-489193%22%20slang%3D%22en-US%22%3EI%20find%20it%20easy%20to%20manipulate%20formulas%20in%20MS%20Excel.%20I%20advise%20you%20to%20you%20use%20it.%20If%20you%20encounter%20issues%2C%20you%20can%20always%20post%20it%20here.%20I%E2%80%99m%20sure%20such%20issues%20will%20be%20resolved%20soon%2C%20not%20necessarily%20by%20me.%3C%2FLINGO-BODY%3E
CrabbyHorse
New Contributor

Hi. I need some help with cells referencing other cells in another worksheet. 

The initial setup works fine. For example the first worksheet has a column containing the alphabet in order. I reference those cells in another worksheet so I get another identical alphabet column. I go back to the first worksheet and mess about with the order of the letters. E.g. add a blank row somewhere; move a row further down the sheet somewhere etc. 

When I go to the second worksheet again, all the dynamic referencing is maintained so my alphabet is still in the correct order. So far so good.

But when I now sort the first worksheet back into alphabetical order (using the data sort utility) the dynamic referencing in the second worksheet is lost and the alphabet is now all out of sequence (as though I had used fixed referencing with $ signs). How do I preserve the dynamic referencing without having to perform the sort manually? Any ideas?

4 Replies
Sorry; by dynamic and fixed referencing I meant 'relative' and 'absolute'.
You have to extract the alphabets in Sheet1 to Sheet 2 and sort them in ascending order. For example, your column labels in both Sheets are in Row 1 and your data begins in Row 2, the formula in Sheet2!A2, copied down rows, is:
=IFERROR(LOOKUP(2,1/(COUNTIF(Alphabets,">="&Alphabets)=MAX(INDEX(
COUNTIF(Alphabets,">="&Alphabets)*(COUNTIF(A$1:A1,Alphabets)=0),0))),
Alphabets),"")
In the foregoing formula, Alphabets is a range name defined as:
=Sheet1!$A$2:INDEX(Sheet1!$A:$A,COUNTA(Sheet1!$A:$A))

 

Hi @Twifoo 

Wow it works! Thank you!

But it's all magic to me. I was looking for something much simpler since I would struggle to fix it if I need to modify it for any reason.

To be honest, I usually use "Numbers" on my Mac but I had the same problem there.  And the Apple

Help desk couldn't help me but thought the Numbers software needed to be fixed (they could be scratching their heads right now!)

Hence I am on a free trial of MS Office Excel system.  

What I am doing is using spreadsheets as a simple relational database, each sheet representing a normalised table. And I was getting on fine until I ran into this problem. I don't think I can transplant your solution to Numbers because it doesn't seem to support Range Names for a start.

My other option is to use MS Access or SQLite on the Mac but I think the learning curve might be too steep at my age!

So for now, I am just heading up each relevant sheet with 'Do Not Sort!'. For example it would have been nice to sort a 'person' table by either surname or first name, but I would always have to 'Undo Sort" to maintain data integrity. 

Let me know if you think of any simpler ways of achieving this objective.

Thanks again.

John

I find it easy to manipulate formulas in MS Excel. I advise you to you use it. If you encounter issues, you can always post it here. I’m sure such issues will be resolved soon, not necessarily by me.
Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Edge insider Dev bypasses IE mode website list
HotCakeX in Enterprise on
4 Replies