Power Query: Cell Referencing
7 February 2018
Welcome to our Power Query blog. This week, I take a look at how to reference a cell in an Excel workbook from Power Query.
I will begin by creating a query from the item data below:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2018/power-query/02-feb/pq-62-image1.png/d9276e84ea639c2159adf405dfdfffe1.jpg)
On the ‘Data’ tab, in the ‘Get and Transform’ section, I choose to create a new query ‘From Table’.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2018/power-query/02-feb/pq-62-image2.png/30474704050999ed51920e203bd6c538.jpg)
This all looks fine, but now I want to add the ‘Grand Total’ from another sheet in my Workbook.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2018/power-query/02-feb/pq-62-image3.png/155f4eac5ecdef81b4ded99373e888ac.jpg)
My first step is to name my cell using the Name Box (highlighted above, currently displaying the cell K5). I will call it ‘Grand_Total’.
I go back to my query, and I choose to create a ‘Custom Column’ from the ‘Add Column’ tab:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2018/power-query/02-feb/pq-62-image4.png/d9076023349f4f7147724bd9ee89a013.jpg)
I have entered the following formula:
Excel.CurrentWorkbook(){[Name="Grand_Total"]}[Content]{0}[Column1]
When I click ‘OK’, my new column is added.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2018/power-query/02-feb/pq-62-image5.png/a1b5373676bbc00978d4a7a35cafba2f.jpg)
This method works for character and numeric cells (including dates).
Want to read more about Power Query? A complete list of all our Power Query blogs can be found here. Come back next time for more ways to use Power Query!