Formula to concatenate text based on criteria and < than 145 characters

Damo100

New Member
Joined
Jul 17, 2019
Messages
2
Hi

I have created a "monstrosity" of a formula to return text from another worksheet contingent upon the criteria in column A or D of the 'Transactions for Recode' worksheet and returns text to a maximum of 145 characters.
The formula is way too large and takes some time to calculate. I was hoping that someone could review this formula and assist me to reduce it's size or make it calculate much quicker?

Below is a screenshot of the formula described above.

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]=IF(LEN(IF('Transactions for Recode'!B31="Adjustment","Recode - "&'Transactions for Recode'!E31,IF('Transactions for Recode'!O31="",IF('Transactions for Recode'!D31="INVENTORY","Recode - "&'Transactions for Recode'!M31,"Recode - "&'Transactions for Recode'!K31&" - "&'Transactions for Recode'!L31),IF('Transactions for Recode'!D31="INVENTORY","Recode - "&'Transactions for Recode'!P31&" - "&'Transactions for Recode'!N31&" - "&'Transactions for Recode'!M31,"Recode - "&'Transactions for Recode'!P31&" - "&'Transactions for Recode'!N31&" - "&'Transactions for Recode'!K31))))>25,LEFT(IF('Transactions for Recode'!B31="Adjustment","Recode - "&'Transactions for Recode'!E31,IF('Transactions for Recode'!O31="",IF('Transactions for Recode'!D31="INVENTORY","Recode - "&'Transactions for Recode'!M31,"Recode - "&'Transactions for Recode'!K31&" - "&'Transactions for Recode'!L31),IF('Transactions for Recode'!D31="INVENTORY","Recode - "&'Transactions for Recode'!P31&" - "&'Transactions for Recode'!N31&" - "&'Transactions for Recode'!M31,"Recode - "&'Transactions for Recode'!P31&" - "&'Transactions for Recode'!N31&" - "&'Transactions for Recode'!K31))),145),IF('Transactions for Recode'!B31="Adjustment","Recode - "&'Transactions for Recode'!E31,IF('Transactions for Recode'!O31="",IF('Transactions for Recode'!D31="INVENTORY","Recode - "&'Transactions for Recode'!M31,"Recode - "&'Transactions for Recode'!K31&" - "&'Transactions for Recode'!L31),IF('Transactions for Recode'!D31="INVENTORY","Recode - "&'Transactions for Recode'!P31&" - "&'Transactions for Recode'!N31&" - "&'Transactions for Recode'!M31,"Recode - "&'Transactions for Recode'!P31&" - "&'Transactions for Recode'!N31&" - "&'Transactions for Recode'!K31))))

Any assistance would be greatly appreciated.

Regards,
Damo100

[/FONT]
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
what's the criteria in simple English?
 
Upvote 0
Hi AlanY

If the reference in column B of the 'Transactions for Recode' worksheet = 'Adjustment', concatenate several different cells
If the reference in column O = "" and the reference in column D = "Inventory", then concatenate a number of different cells
OR if the reference in column O = something other than zero and
the reference in column D = "Inventory", then concatenate a different set of cells
All of this within the context of returning a maximum of up to 145 characters in total.

Hope that makes sense?

Regards,
Damo100
 
Upvote 0
what I would do is to make use of helper columns to concatenate the cells based on the criteria and use the if() function to pick it out.
btw, what are you going to do if it's > 145 characters?
 
Upvote 0

Forum statistics

Threads
1,214,403
Messages
6,119,309
Members
448,886
Latest member
GBCTeacher

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