Modify Formula to Create Acronyms; Not Reference First 3 Characters

luxehouseofcouture

New Member
Joined
Dec 26, 2018
Messages
11
Hello,

Someone from this forum helped me create the below formula to automate and standardize the process of creating unique SKU's for my Shopify products:

Rich (BB code):
=UPPER(CONCATENATE(LEFT(CONCAT(LEFT(D2,1),IF(ISERROR(FIND(" ",D2)),MID(D2,2,3),MID(D2,SMALL(IF(MID(D2,ROW(INDIRECT("A1:A"&LEN(D2))),1)=" ",ROW(INDIRECT("A1:A"&LEN(D2)))+1),ROW(INDIRECT("A1:A"&LEN(D2)-LEN(SUBSTITUTE(D2," ",""))))),1))),4),"-",LEFT(SUBSTITUTE(CONCAT(LEFT(B2,1),MID(B2,SMALL(IF(MID(B2,ROW(INDIRECT("A1:A"&LEN(B2))),1)=" ",ROW(INDIRECT("A1:A"&LEN(B2)))+1),ROW(INDIRECT("A1:A"&LEN(B2)-LEN(SUBSTITUTE(B2," ",""))))),1)),"&",""),4),"-",IF(ISERROR(FIND("/",I2)),LEFT(I2,3),CONCAT(IF(NOT(ISERROR(FIND(" ",I2))),LEFT(I2,1),LEFT(I2,1)),IFERROR(MID(I2,FIND(" ",I2)+1,1),""),MID(I2,SMALL(IF(MID(I2,ROW(INDIRECT("A1:A"&LEN(I2))),1)="/",ROW(INDIRECT("A1:A"&LEN(I2)))+1),ROW(INDIRECT("A1:A"&LEN(I2)-LEN(SUBSTITUTE(I2,"/",""))))),1))),"-",INDEX(Codes!$M:$M,MATCH(K2,Codes!$L:$L,0))))

You can read the original thread here.

There's just one problem, which when solved, will help ensure the formula is creating less duplicate values. When there is one color with multiple words (i.e. Light Teal Blue), the formula is currently converting it to LIG, which is just referencing the first three characters of the value in the cell. I would rather it convert to LTB instead, which is an acronym of the cell in the value. What would I have to adjust to make this happen?

Any assistance you can provide would be greatly appreciated. I'm under a strict deadline here.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I am very curious about whether or not the excel spreadsheet that was referenced in the original post, as I cannot seem to click to see the original worksheet and even placing the formula in a blank worksheet, the formula is not working for me... Please help.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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