Remove Characters from Both Sides of a Formula

default_name

Board Regular
Joined
May 16, 2018
Messages
180
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Hello again,

You guys are so helpful!
I currently have the following formula on a cell:
Code:
=INDEX(DI1:DT1,MATCH(MAX(DI2:DT2),DI2:DT2,0))
It is working great.

However, I would like to add additional functionality to the formula, where 19 characters of the output are removed from the left, and 31 characters are removed from the right.
I have looked online and have found formulas like:
Code:
=LEFT(text,LEN(text)-n)

But I have been struggling to mix this into my existing INDEX code without messing it up.

Here is my current attempt:
Code:
=AND(LEFT(INDEX(DI1:DT1,MATCH(MAX(DI2:DT2),DI2:DT2,0)),LEN(INDEX(DI1:DT1,MATCH(MAX(DI2:DT2),DI2:DT2,0)))-31),RIGHT(INDEX(DI1:DT1,MATCH(MAX(DI2:DT2),DI2:DT2,0)),LEN(INDEX(DI1:DT1,MATCH(MAX(DI2:DT2),DI2:DT2,0)))-19))

You guys are the best!
Thanks in advance for all of your help!
 
Last edited:

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
How about
=MID(INDEX(DI1:DT1,MATCH(MAX(DI2:DT2),DI2:DT2,0)),20,LEN(INDEX(DI1:DT1,MATCH(MAX(DI2:DT2),DI2:DT2,0)))-50)
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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