Link to home
Start Free TrialLog in
Avatar of Washcare
WashcareFlag for United Kingdom of Great Britain and Northern Ireland

asked on

A VBA Solution to using the MCONCAT Function from the Morefunc Add-in

Good Afternoon

Having got a working solution, to a previous question, which is only hampered by the IT Policy, I am looking for a VBA work around. The original problem:

Please see the Excel workbook for further details - warning contains a formula which requires the Morefunc add-in

I am trying to match a list of items(Column C) to a given location(Column A), to help with future amendments to both the location and list of items I would like to refference a refference type table. Its this arrangement between the data and the refference table that makes me think of a VLookup?

A full example can be seen in the workbook, where column E refferes to what I would like to be left with. Each item has its own unique code and is in the following format:

Item;#Number;#

The solution, which works is the use of the MCONCAT function from the Morefunc add-in, with the following:

=MCONCAT(IF(ISNUMBER(1/SEARCH(Information!B$2:B$15,C2)/(A2=Information!A$2:A$15)),Information!B$2:B$15,""))

I have had a Google search of the VBA functionality for the AConcat as suggested, but VBA is outside my comfort zone.

Any ideas

Many thanks
Example.xls
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Washcare

ASKER

Many thanks
It would be best to group the shorter strings together to savoid adding the longer string twice

Concat = Concat & (strSeparator & Target(lngIndex, 1))

Cheers

Dave