Translate Formula into Business Language

krystalhaze

New Member
Joined
Jul 5, 2016
Messages
15
Hi people :)

I need a little help breaking down this formula into business language - I get the gist of it, but I need to be able to explain the "rules" used to create the values in this cell (formula exists in cell U1).

=IF(LEN(T1)<=255,T1,MID(MID(T1,1,240),1,FIND("|",SUBSTITUTE(MID(T1,1,240)," ","|",LEN(TRIM(MID(T1,1,240)))-LEN(SUBSTITUTE(MID(T1,1,240)," ","")))))&X1&"....")

I understand the beginning portion: if the length of the text in cell T1 is less than or equal to 255 characters, use that text. The next part tells me that if it's more than 255 characters, use the first 240 characters. Then it gets fuzzy with the finds and substitutes because I'm not very familiar with those formulas...

I appreciate any help you all can provide! Let me know if you need more info to break this down.

Thanks!!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
If the length of the data in T1 is less than 256, return the full length of T1. Otherwise, truncate T1 after the last space found in the first 240 characters of T1, then append what's in X1 and "..." to that.

It can probably be shortened a bit, the MID(T1,1,240) can be replaced with LEFT(T1,240)
 
Upvote 0
Can you give us a sample of the entries that might appear in T1 and X1 please ?

It might be easier for us to work out what is happening here, with this information.
 
Upvote 0
Thanks, Eric! I thought the same thing about replacing MID with LEFT... unfortunately, this isn't my spreadsheet, or I'd have gone about the whole thing a little differently.

Thanks again for your help! :)
 
Upvote 0
Can you give us a sample of the entries that might appear in T1 and X1 please ?

It might be easier for us to work out what is happening here, with this information.

T1 contains a metric name (e.g., 45:Taxes)
X1 contains a corresponding code (e.g., CCAR220)

I'm not sure how helpful that is... ;)
 
Upvote 0
Well the whole point about this seems to be to deal with examples where the text string is more than 240 characters long.

The example you gave - 45:Taxes - is 8 characters long, so that doesn't really help much at all.

ARE THERE any possible examples where the text string is more than 240 characters long ?
If yes, please provide one.
If no, then I don't think you need this formula.
 
Upvote 0
Well the whole point about this seems to be to deal with examples where the text string is more than 240 characters long.

The example you gave - 45:Taxes - is 8 characters long, so that doesn't really help much at all.

ARE THERE any possible examples where the text string is more than 240 characters long ?
If yes, please provide one.
If no, then I don't think you need this formula.

Yeah, there definitely are, but I'm a little hesitant to put it here, because it is proprietary data and I don't want to get into any trouble if someone were to stumble across this forum... unlikely, but still! :eek:

This formula was created because the system we're loading the data into has character limitations. So, if you really want to test it out, you could type up some gibberish of 256+ characters and see how it works...

I think Eric's explanation pretty well covers me though. I appreciate your willingness to help regardless! :)
 
Upvote 0

Forum statistics

Threads
1,216,575
Messages
6,131,501
Members
449,654
Latest member
andz

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