Note that this answer might not have been an option at the time of this question.
Give your cell a range name:
With your cell selected click From Table/Range on the Data menu.
Power Query opens with the parameter in a query with the type automatically detected.
Right-click the parameter value and select drill down.
The query now returns a number and can be used in M-code.
There is a problem if your parameter is text. Power Query will try to be helpful and promote it to a column header.
You'll have to delete that from the resulting query and change the type to text.
Here is what it looks like after deleting the Promoted Headers and Changed Type steps, and adding the new Changed Type and Drill Down steps. I used the GUI and am showing the Advanced Editor for reference.