Forum Discussion
Joel_Bauer
Sep 15, 2021Copper Contributor
Excel Text Manipulation II
Device: PC/Windows 10 Microsoft Office Home and Business 2013 Excel Product ID: 00196-20943-85146-AA714 Dear Community, Here is my second posting on this subject. By myself I am making a bit ...
HansVogelaar
Sep 15, 2021MVP
As an alternative, a very short VBA function:
Function GetAnimals(Animals As String, Letter As String)
GetAnimals = Join(Filter(Split(Animals, ","), Letter & "-"), ",")
End Function
Use like this:
See the attached version (now a macro-enabled workbook).
Joel_Bauer
Sep 17, 2021Copper Contributor
Hi Hans,
Thanks so much for your response, but I need some help implementing it.
Unfortunately I do not know how to add your @(Animals) function or any function a .xslm workbook.
Can you tell me or can you point me to some useful documentation?
Also I have an issue with the .xslm workbook you sent me.
I get an “#NAME?” error in column E when I hit return in the formula bar. Is this error due to the fact that the ‘@Animals’ function is not installed in my excel version?
Joel
Thanks so much for your response, but I need some help implementing it.
Unfortunately I do not know how to add your @(Animals) function or any function a .xslm workbook.
Can you tell me or can you point me to some useful documentation?
Also I have an issue with the .xslm workbook you sent me.
I get an “#NAME?” error in column E when I hit return in the formula bar. Is this error due to the fact that the ‘@Animals’ function is not installed in my excel version?
Joel
- HansVogelaarSep 17, 2021MVP
The [@Animals] in the formula is a so-called structured table reference. It points the the cell in the Animals column in the same row.
Did you allow macros when you opened the workbook?
See Create custom functions in Excel for info on creating a VBA function.
- Joel_BauerSep 21, 2021Copper ContributorHans,
Thank you so much.
Now this function is working for me in my 2013 Excel version when I use the suffix .xlsm.
I tried and I guess somehow I allowed macros.
Also I can modify your function a bit as necessary.
Joel