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

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
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))),"")
 
Upvote 0
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!
 
Upvote 0
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))
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

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