At (@) notation inconsistent?

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,532
Office Version
  1. 365
Platform
  1. Windows
I have been using the @ notation a lot since it was suggested to me here. It has made a lot of things easier.

I just encountered a situation where it does not appear to. Can anyone help me understand what is going on?.

In this table, I assigned the name "Values" to the range D8:D12, the literal values). When I tried access that range using the @ notation (@Values), which I thought would resolve to the value ij the cell in that range that is on the same row. It works in some situations, but not in others.

1630785128362.png


In Column E, I use @Values to get the member of the named range that is on the same row. The formulas are shown in Column H. It works perfectly.

Columns F & G should return the same values, but they don't. In F, I use @Values, which fails. In G, I use a cell reference. It works.

What is going on? What am I doing wrong?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
You would need to use something like
Excel Formula:
=SUM(INDEX(@Values,):D$12)
If you use the evaluate formula button the formula tab, you can see why your formula doesn't work.
 
Upvote 0
Solution
Equivalent formula

=SUM((@D:D):D$12)
 
Upvote 0
You would need to use something like
Excel Formula:
=SUM(INDEX(@Values,):D$12)
If you use the evaluate formula button the formula tab, you can see why your formula doesn't work.
OK, here are the results of Evaluate on the formula in F10. Now I have even more questions:

1630847904306.png


Apparently, the SUM function doesn't care how many cell references are separated by colons:

1630848308434.png

Weird.

So apparently, the solution to my problem is: "=sum((@Values):D$12). This is what you explained, but without the extra comma. Why did you add that?
 
Upvote 0
Because the implicit intersection works on a range, xl has to decide what that range is.
So first the named range is replaced by the actual range, then the union is done & finally the intersect is found.

By using index, or putting brackets around the @Values the intersect is calculated first & then the union is done, because it's treated as a separate calculation.
 
Upvote 0
Because the implicit intersection works on a range, xl has to decide what that range is.
So first the named range is replaced by the actual range, then the union is done & finally the intersect is found.

By using index, or putting brackets around the @Values the intersect is calculated first & then the union is done, because it's treated as a separate calculation.
This makes no sense to me. "@Values" should be an intact unit (or identity) equal to "D10" (or "$D$10") in this case. That is what should be done first, IMNSHO.
 
Upvote 0
It has never worked that way & in my opinion shouldn't.
If the named range was a single cell & it worked the way you want it to, then there would be problems.
+Fluff 1.xlsm
DEF
7
81#SPILL!1
92#SPILL!2
103#SPILL!3
114#SPILL!4
12515
132
143
154
165
Main
Cell Formulas
RangeFormula
E8:E16E8=(@Values):D$12
F8:F12F8=Values:D$12
Named Ranges
NameRefers ToCells
Values=Main!$D$8:$D$8F8:F12, E8:E16
 
Upvote 0
It has never worked that way & in my opinion shouldn't.
If the named range was a single cell & it worked the way you want it to, then there would be problems.
I'm afraid you are now over my head. I don't understand the point you are making.
 
Upvote 0
If Values was a single cell (in this case D8) & xl evaluate @VALUE before anything else, then using this formula =@Values:D$12 would create a spill range, rather than using the implicit intersection.
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,500
Members
449,090
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top