Reference table properties name & row number

andydtaylor

Active Member
Joined
Feb 15, 2007
Messages
360
Office Version
  1. 2016
Hi

For purpose of extraction to Power Query I would like to add columns to my tables with table name and row number. What are the simplest cleanest formulas I can use to do this? Presently hard coding table name and using row()-x formula for row number. My preference would be to somehow reference table properties directly.

Thanks


Andy
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Here's a "sideways" approach

- I created a table named Table1 in A1:B18
Code:
E1: =Table1[#All]
- This formula references the formula in E1 and parses out the table name:
Code:
F1: =MID(LEFT(FORMULATEXT(E1),FIND("[",FORMULATEXT(E1))-1),2,100)
which returns: Table1

- I added a column named TableName to my table and put this formula in it:
Code:
=$F$1

Is that something you can work with?

For the row number, couldn't you just have power query add an Index column?
 
Last edited:
Upvote 0
Hi

Thanks for your suggestions - will evaluate. Yes I can add index in PQ but I am seeking to create a visible audit trail within a financial model. Embedding logic in PQ makes this audit trail less transparent.

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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