Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-03-2016, 03:12 AM
tinfanide tinfanide is offline INDIRECT and Relative Referencing? Windows 7 64bit INDIRECT and Relative Referencing? Office 2010 32bit
Expert
INDIRECT and Relative Referencing?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default INDIRECT and Relative Referencing?


Code:
Absolute referencing:
=INDIRECT("'"&B$1&"'!$N"&ROW()+1)

VS

Relative referencing:
=INDIRECT("'"&B$1&"'!$"&N&ROW()+1)
The relative one returns an error: #NAME
Although the absolute one is correct, I would like to have the column ("N" in this case) relative. This means when I insert a new column (then "N" should be "O"), the formula updates it automatically. How could I achieve that?

Any help is appreciated.
Reply With Quote
  #2  
Old 03-03-2016, 06:28 AM
xor xor is offline INDIRECT and Relative Referencing? Windows 10 INDIRECT and Relative Referencing? 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 INDIRECT and Relative Referencing?

Maybe like this:
Attached Files
File Type: xlsx Indirect_test.xlsx (9.8 KB, 9 views)
Reply With Quote
  #3  
Old 03-03-2016, 06:48 PM
tinfanide tinfanide is offline INDIRECT and Relative Referencing? Windows 7 64bit INDIRECT and Relative Referencing? Office 2010 32bit
Expert
INDIRECT and Relative Referencing?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

Quote:
Originally Posted by xor View Post
Maybe like this:
Yes. It turns into relative referencing. Thanks.
But technicially speaking, I'm wondering if the blue highlighted one (below) could be all in one formula (so that there is only one cell).

Of course, the red one (my testing) returns an error (i.e. #REF!).

Code:
=INDIRECT("'"&B$1&"'!"&ADDRESS(ROW(),???))

=INDIRECT("'"&B$1&"'!"&ADDRESS(ROW()+1,COLUMN(INDIRECT("'"&B$1&"'!"&N$1)))
Reply With Quote
  #4  
Old 03-03-2016, 10:49 PM
xor xor is offline INDIRECT and Relative Referencing? Windows 10 INDIRECT and Relative Referencing? 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 wrote:

But technicially speaking, I'm wondering if the blue highlighted one (below) could be all in one formula (so that there is only one cell).
---------
One should always be cautious arguing that something is impossible in Excel, but here I think such a claim is justified. At least I don't know of any way to get what you want.

And by the way, my formula does not at all work in general, only for the sheet presently specified in B1. If for example you insert Sheet3 and change B1 to Sheet3 you will need to have a similar formula as the one in H1 in for example I1 referring to Sheet3 and change the formula to: =INDIRECT("'"&B$1&"'!"&ADDRESS(ROW()+1;I1))

(It may be possible to automate the change of the last argument, H1, I1,.... as you change B1).
Reply With Quote
  #5  
Old 03-07-2016, 05:46 AM
tinfanide tinfanide is offline INDIRECT and Relative Referencing? Windows 7 64bit INDIRECT and Relative Referencing? Office 2010 32bit
Expert
INDIRECT and Relative Referencing?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

Yes, I agree, if there's any workaround or a trick to get over it.
Reply With Quote
  #6  
Old 03-07-2016, 06:37 AM
xor xor is offline INDIRECT and Relative Referencing? Windows 10 INDIRECT and Relative Referencing? 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

@tinfanide

Here you have it all in one formula.
Attached Files
File Type: xlsx Indirect_Intricacies.xlsx (13.7 KB, 13 views)
Reply With Quote
  #7  
Old 03-07-2016, 06:54 AM
xor xor is offline INDIRECT and Relative Referencing? Windows 10 INDIRECT and Relative Referencing? 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

Please be aware that I forgot to change semicolon to comma in my comment in the attached file Sheet1!N14. (I use semicolon as argument separator).
Reply With Quote
  #8  
Old 03-15-2016, 06:23 AM
tinfanide tinfanide is offline INDIRECT and Relative Referencing? Windows 7 64bit INDIRECT and Relative Referencing? Office 2010 32bit
Expert
INDIRECT and Relative Referencing?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

Quote:
Originally Posted by xor View Post
Please be aware that I forgot to change semicolon to comma in my comment in the attached file Sheet1!N14. (I use semicolon as argument separator).
Thanks for the workaround. It's perfect!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Indirect with hlookup jamesjts Excel 3 01-05-2016 09:13 AM
Indirect AND OR Formula Help del_piero_3 Excel 3 09-18-2015 02:58 PM
INDIRECT and Relative Referencing? Indirect Reference? tinfanide Excel 2 08-28-2015 05:11 PM
Confusion on INDIRECT function thatgirlaudrey Excel 4 06-06-2014 09:23 PM
Indirect zleyphox Excel 1 02-11-2010 09:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:24 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