Hi,
I can't figure out how to do this (there probably are many ways, but anyway):
I have a large Excel workbook that needs to work for many different projects and so I have user forms and named ranges to set and store config parameters.
One of the parameters that is stored is a string defining a syntax for one particular VBA function. If the string is i.e. "Z"&PROD&"-"&SYS then I would like the function to concatenate values like it is indicated in the "syntax string" and return the concatenated string.
The function call from cell F6 can be =FormatTag(F6) but here is perhaps another issue.
Any help for a newbie is appreciated!
Best regards,
Terje
I can't figure out how to do this (there probably are many ways, but anyway):
I have a large Excel workbook that needs to work for many different projects and so I have user forms and named ranges to set and store config parameters.
One of the parameters that is stored is a string defining a syntax for one particular VBA function. If the string is i.e. "Z"&PROD&"-"&SYS then I would like the function to concatenate values like it is indicated in the "syntax string" and return the concatenated string.
The function call from cell F6 can be =FormatTag(F6) but here is perhaps another issue.
Code:
Function FormatTag(MyCell As Range)
Syntax = Range("Syntax_Tag") ' example: "Z"&PROD&"-"&SYS
PROD = Range(MyCell).Offset(0,3)
SYS = Range(MyCell).Offset(0,2)
FormatTag = Syntax
End Function
Any help for a newbie is appreciated!
Best regards,
Terje