Forum Discussion
LOOKUP to include formatting with its Return Value? Formatting Code Function? non-VBA request
> Is it because Unicode
Well, yes - they have to be HTML coded,
I continued on your path using keywords in the input for the unichars and appended a lookup table with the HTML codes.
A lambda function in col G loops through the rows in [Name in text] and replaces the keywords with [HTML].
Thus, column N shows also unicharacters with formats available in html.
BTW: FILTERXML is already available in Excel. Maybe FILTERHTML could be in a future version.
-/-
I ran some tests with converting the strings using calls to other program libraries like Internet Explorer but found no big upside in doing so.
Attached an enhanced version ending with "_XL.xlsm" (like not using IE) where you also can have your calculations and the output on separate sheets.
Using html to format calculated results may in deed come handy.
bosinander Thanks for helpful sharing of file. On the other hand, I am finding how to view its insides and stay within IT constraint.
For Enterprise users, how to view code/formlae without opening macro file shared by external user?
- bosinanderAug 01, 2023Iron Contributor
sunnyschindler You're welcome 🙂 And good point about files with acitve content!
Users without Enterprise possibilities may analyse the macro as plain text (if withheld) before applying it.
Such xlsx version attached with the macro code as plain text on a sheet.
- sunnyschindlerAug 03, 2023Brass Contributor
bosinander Thanks for more help. But my VBA literacy is insufficient and needs to change line from
' Path = ThisWorkbook.Path & " \ " & tmpFile 'get path to a temp file in same folder Path = TargetFolder & " \ " & tmpFile 'get path to a temp file in same folderThe Target Folder works for code as follows
'https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/freefile-function Sub FreeFile_Example1() Dim Path As String Dim FileNumber As Integer Dim TargetFolder As String TargetFolder = "C:\Users\wongsunn\OneDrive - Schindler\Documents\scrap" Path = TargetFolder & "\Articles2019File 1.txt" FileNumber = FreeFile Open Path For Output As FileNumber Path = TargetFolder & "\Articles2019File 2.txt" FileNumber = FreeFile Open Path For Output As FileNumber End SubNow I have to resolve error "Open Path For Output As #fileNo".
 
- bosinanderAug 03, 2023Iron Contributor
sunnyschindler Use a hard coded target folder of your choice instead of ThisWorkbook.Path
' path = ThisWorkbook.path & "\" & tmpFile 'get path to a temp file in same folder path = "C:\Users\wongsunn\OneDrive - Schindler\Documents\scrap" & "\" & tmpFile 'get path to a temp file