substitute / trim

gmazza76

Well-known Member
Joined
Mar 19, 2011
Messages
769
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,

I am trying to align the formula below based on the length of the result if possible, but I am at a loss on how to do this.
Ideally the correct value I want is always more than 1 character in length, but I am unsure how to check this point instead of the "N" as there are more variable for the "N" than say being over 2 characters in length.

Code:
=if(TRIM(LEFT(SUBSTITUTE(MID(SUBSTITUTE('test'[column1],",","x",5),FIND("x",SUBSTITUTE('test'[column1],",","x",5))+1,99),",",REPT(" ",99)),99))="N",
TRIM(LEFT(SUBSTITUTE(MID(SUBSTITUTE('test'[column1],",","x",7),FIND("x",SUBSTITUTE('test'[column1],",","x",7))+1,99),",",REPT(" ",99)),99))

Thanks in advance
Gavin
 

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.
Provide some sample text and expected result to show what you want to get as result
 
Upvote 0
Solution

Forum statistics

Threads
1,223,694
Messages
6,173,879
Members
452,536
Latest member
Chiz511

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