Field name as a variable

ExcelStarter

New member
Joined
Jan 23, 2018
Messages
27
Reaction score
0
Points
0
Excel Version(s)
2016
Snap9.jpg


Is there a simpler code?
[Custom] --> How do I make it a variable?

* I could not speak English well and attached it as a picture and file.
 

Attachments

  • sample.xlsx
    17.5 KB · Views: 11
Last edited:
I solved it myself.[FONT=돋움]

( A , B , C ) =>[/FONT]

[FONT=돋움]let[/FONT]
[FONT=돋움]Source = Excel.CurrentWorkbook(){[Name=Table1"]}[Content],[/FONT]
[FONT=돋움]Result = try Record.Field(Source{Record.FromList({B},{A})},C) otherwise "Error" [/FONT]
[FONT=돋움]in[/FONT]
[FONT=돋움]Result[/FONT]
 
Back
Top