Forum Discussion
Detect cell notation with formula or Power Query
- May 25, 2020
No problem! Please replace the UDF with the following one.
Function getCurrencySymbol(AmtCell As Range) As String Dim Matches As Object With CreateObject("VBScript.RegExp") .Global = False .Pattern = "General ""([A-Z]{3})""" If .test(AmtCell.NumberFormat) Then Set Matches = .Execute(AmtCell.NumberFormat) getCurrencySymbol = Matches(0).SubMatches(0) Else getCurrencySymbol = "EUR" End If End With End FunctionIf that takes care of your question, please accept the post with the proposed solution as a Best Response to mark your question as Solved.
Can you upload a sample workbook along with the desired output mocked up manually?
- pkogels_acsi_euMay 24, 2020Copper Contributor
You're the first and only one to reply. Please find the attachment.
Looking forward to a solution,
Paul Kogels
- SergeiBaklanMay 24, 2020Diamond Contributor
- pkogels_acsi_euMay 24, 2020Copper Contributor
Dear SergeiBaklan,
I am afraid I was not quite clear. Starting position can be found in merely the values in cells A4:A11. The currency code can only be found in the cell notation, behind CTRL-1.
All other columns were manually entered by my self to explain my problem.
I want to read the currency code in cells A4:A11 with a formula or with Power Query.
Do you have a solution?
Paul