INDEX the cell after the "/"

William Benton

New Member
Joined
Apr 26, 2015
Messages
7
I have a formula that returns what is in a certain cell in column B.

I want the formula to see if there is a "/" in the cell (column B) and if so check for "/" and return what is to the right of "/" and if not return what is in the cell.

This one catches the first "I" - the formula is:

=IF(COUNTIF(SCHEDULE!$F$5:$F$29,"I")>=ROWS($1:1),INDEX(SCHEDULE!B9:B29,SMALL(IF(SCHEDULE!$F$5:$F$29="I",ROW($1:$25)),ROWS($1:1))),"")

If this could be reduced I am all ears.

I don't see if I can attach a sample anywhere.

Bill
 

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.

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
A bit confused here :?

Your request says to test for / but your formula is looking for I? So which 1 do you want?
Also, doing the formula that way, you need to keep the ranges the same size...\
=IF(COUNTIF(SCHEDULE!$F$5:$F$29,"I")>=ROWS($1:1),INDEX(SCHEDULE!B9:B29,SMALL(IF(SCHEDULE!$F$5:$F$29="I",ROW($1:$25)),ROWS($1:1))),"")

I would modify that to this...
=IFERROR(IDEX(SCHEDULE!$B:$B,SMALL(IF(SCHEDULE!$F$5:$F$29="I",ROW($F$5:$F$25)),ROWS($1:1))),"")
 

William Benton

New Member
Joined
Apr 26, 2015
Messages
7
A bit confused here :?

Your request says to test for / but your formula is looking for I? So which 1 do you want?
Also, doing the formula that way, you need to keep the ranges the same size...\
=IF(COUNTIF(SCHEDULE!$F$5:$F$29,"I")>=ROWS($1:1),INDEX(SCHEDULE!B9:B29,SMALL(IF(SCHEDULE!$F$5:$F$29="I",ROW($1:$25)),ROWS($1:1))),"")

I would modify that to this...
=IFERROR(IDEX(SCHEDULE!$B:$B,SMALL(IF(SCHEDULE!$F$5:$F$29="I",ROW($F$5:$F$25)),ROWS($1:1))),"")

Thankyou!
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
37,944
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows

ADVERTISEMENT

I have a formula that returns what is in a certain cell in column B.

I want the formula to see if there is a "/" in the cell (column B) and if so check for "/" and return what is to the right of "/" and if not return what is in the cell.
Give this formula a try...

=TRIM(LEFT(RIGHT(SUBSTITUTE("/"&B2,"/",REPT(" ",400)),400),400))
 

William Benton

New Member
Joined
Apr 26, 2015
Messages
7
Thankyou!

I look for the "I" to return what is in column B. Trouble is what is in B could either be one name or two names separated by "/". If separated by the "/" I want to return what is to the right of it and if no "/" just return the name.

Sorry for the late reply. Thanks for helping.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,748
Messages
5,855,442
Members
431,733
Latest member
bestassignmentexpert789

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
Top