Optimal Join of a text to string with Logic

sryair

New Member
Joined
Feb 5, 2016
Messages
7
I need to Join together By Logic some Attributes (Delimited with “ | “


Attribute Name Attribute Sequence prefix
SHORT NAME MODULE,DISCRETE 1
TYPE OUTPUT 2
SIZE 100MM 3 SZ
POWER SUPPLY 24VDC 4 PS
POWER RATING 100W 5 PR
NUMBER OF INPUTS 16 DIGITAL 6
NUMBER OF OUTPUTS 16 ANALOG 7
MOUNTING PLUG-IN 9
APPLICATION COMPUTER 15 APP
FREQUENCY 50HZ 16

The max length of the join string is 50 characters
The first two attributes must be in the join string

The Other Attributes by the Sequence
Then required to optimize and check if the join length of the string is the max possible


Any ideas how to do this with VBA code in Excel?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
care to provide examples of the finished requirement

what drives the logic, what rules would the human apply to get the result EVERYTIME
 
Upvote 0
SHORT NAME: MODULE,DISCRETE
TYPE: OUTPUT
SIZE: 100MM
POWER SUPPLY: 24VDC
POWER RATING: 100W
NUMBER OF INPUTS: 16 DIGITAL
NUMBER OF OUTPUTS: 16 ANALOG
MOUNTING: PLUG-IN
APPLICATION: COMPUTER
FREQUENCY: 50HZ

The max length of the join string is 50 characters
The first two attributes must be in the join string

The Other Attributes by the Sequence

Then required to optimize and check if the join length of the string is the max possible

the string look like:MODULE,DISCRETE | OUTPUT | 100MM | ETC....

Any ideas how to do this with VBA code in Excel?
 
Upvote 0
The max length of the join string is 50 characters
The first two attributes must be in the join string

The Other Attributes by the Sequence

Then required to optimize and check if the join length of the string is the max possible

the string look like:MODULE,DISCRETE | OUTPUT | 100MM | ETC....
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,692
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top