February 1, 2019
Hi Guys,
i have cell in Excel where i have named range name : "MyNamedRange".
In Names manager there is formula , for example "=1 + A2" and result is dynamic.
It is possible to evaluate witthin PQ string = name of named range?
Thanks for help,
Jacek
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
Hi,
You can take a value from an excel named range just like you do for any table:
= Excel.CurrentWorkbook(){[Name="namedrng"]}[Content]
A table import looks like: = Excel.CurrentWorkbook(){[Name="Table1Name"]}[Content]
If the range is a one cell only, use: = Excel.CurrentWorkbook(){[Name="namedrng"]}[Content]{0}[Column1]
{0} refers to first cell in the named range.
February 1, 2019
Hi Catalin,
1.why to use table to import named range? Can not just directly import it?
2. Assume that "namedrng" is is not named range in cell. It is just a string. It is string which is refering to the same named namerange in names manager so it is evalualting each time when you are refering to it.
Can you evaluate name range in PQ itself or it has to be evaluated first in cell and PQ will take only value from it?
Best,
Jacek
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
You said: i have cell in Excel where i have named range name : "MyNamedRange".
Now you're saying that it's not a named range, it is a defined name only? There is a difference between them.
Power query cannot read defined names that don't refer to a range.
You mentioned that you have a named cell, so I provided the solution for reading named ranges:
= Excel.CurrentWorkbook(){[Name="namedrange"]}[Content]{0}[Column1]
Answers Post
1 Guest(s)