Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-11-2016, 02:26 PM
Marl Marl is offline relational references between worksheets Windows 7 64bit relational references between worksheets Office 2010 32bit
Novice
relational references between worksheets
 
Join Date: Jan 2013
Posts: 8
Marl is on a distinguished road
Default relational references between worksheets

I would like to be able to add a tab and have a copy in a set of formulae and have the formula in a cell refer to the same cell locations in the worksheet to its left in the worksheet tabs.



Example: Worksheets (tabs) are Week1, Week2, etc. I want cell A1 in Week 2 to refer to cell A1 in Week1 and perform a simple subtract function. Then When I add in a new worksheet (tab) for Week 3 I want to be able to copy the formulas in the new worksheet and have cell A1 now refer to Week 2 for its function.

How do I get the sheet reference to be relational to a tab rather than an absolute worksheet name?
Reply With Quote
  #2  
Old 07-11-2016, 09:55 PM
xor xor is offline relational references between worksheets Windows 10 relational references between worksheets Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

You can use the very old XL 4 macro functions in Defined Names.

Open Name Manager and press New. In the New name dialog write PrevShtValue in the Name field. In the Refers to field write the following:

=INDIRECT(INDEX(GET.WORKBOOK(1),GET.DOCUMENT(87)-1)&"!RC",0)

If you now enter =PrevShtValue in Sheet2!A1 it will return the value in Sheet1!A1

Alternatively you will have to use VBA.
Reply With Quote
  #3  
Old 07-13-2016, 04:04 PM
Marl Marl is offline relational references between worksheets Windows 7 64bit relational references between worksheets Office 2010 32bit
Novice
relational references between worksheets
 
Join Date: Jan 2013
Posts: 8
Marl is on a distinguished road
Default

Thanks, I tested that on a sample workbook and it works as described. I appreciate your assistance.
Reply With Quote
  #4  
Old 07-13-2016, 04:11 PM
Marl Marl is offline relational references between worksheets Windows 7 64bit relational references between worksheets Office 2010 32bit
Novice
relational references between worksheets
 
Join Date: Jan 2013
Posts: 8
Marl is on a distinguished road
Default

Can that macro function be revised to specify the cell in the Previous Sheet that is to be used in the new function?

For Example; in cell R1 of the new sheet I would like to perform an operation using the value contained in A1 of the previous sheet. How do I modify the macro to accomplish that?
Reply With Quote
  #5  
Old 07-13-2016, 10:03 PM
xor xor is offline relational references between worksheets Windows 10 relational references between worksheets Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

It is possible.
See the attached.
Attached Files
File Type: xlsm PrevSht.xlsm (9.1 KB, 8 views)
Reply With Quote
  #6  
Old 07-14-2016, 07:58 AM
Marl Marl is offline relational references between worksheets Windows 7 64bit relational references between worksheets Office 2010 32bit
Novice
relational references between worksheets
 
Join Date: Jan 2013
Posts: 8
Marl is on a distinguished road
Default

Thanks you very much. This points to my need to spend some time with VBA.
Reply With Quote
Reply

Tags
relational, worksheet relationships



Similar Threads
Thread Thread Starter Forum Replies Last Post
relational references between worksheets Relational results tel703 Excel 2 05-19-2016 09:54 AM
VBA Worksheets in Excel Iraj Excel Programming 1 05-08-2016 08:59 PM
How do I set default workSHEETs? CanvasShoes Excel 1 08-03-2015 02:39 AM
Convert manual cross references in footnotes to other footnotes to automatic cross references ghumdinger Word VBA 7 11-20-2014 11:47 PM
Help with worksheets on Word eballi Word 4 11-18-2009 05:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft