SUBSTITUTE function

vmjan02

Well-known Member
Joined
Aug 15, 2012
Messages
1,064
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
I have this data, and the functions in row 9 to 13 is not giving me the correct result as required, Actual results are in column E, can any one help to fix it.
I am trying for past 3 hrs but not able to fix it. any help will be great. Need to fix the formula in column D



Book2
ABCDEF
1Short nameLT \minus 3Final ShotNameActual Result
2707-00_BYSHJZ00OL0-GPON-1/1/1/611707-00_BYSHJZ00OL0-GPON-1/1/1/6Correct output
3117-00_ESKNRD00OL3-GPON-1/1/16/11613117-00_ESKNRD00OL3-GPON-1/1/13/1Correct output
4707-00_BYSHJZ00OL0-GPON-1/1/1/711707-00_BYSHJZ00OL0-GPON-1/1/1/7Correct output
5414-00_KYBRDN00OL1-GPON-1/1/19/11916414-00_KYBRDN00OL1-GPON-1/1/16/1Correct output
6241-00_RABGKH00OL1-GPON-1/1/19/21916241-00_RABGKH00OL1-GPON-1/1/16/2Correct output
7213-00_MSLMKH00OL8-GPON-1/1/5/555213-00_MSLMKH00OL8-GPON-1/1/5/5Correct output
8707-00_BYSHJZ00OL0-GPON-1/1/3/633707-00_BYSHJZ00OL0-GPON-1/1/3/6Correct output
9429-00_RNUNDN00OL8-GPON-1/1/14/141411429-00_RNUNDN00OL8-GPON-1/1/11/11429-00_RNUNDN00OL8-GPON-1/1/11/14In this cases formula is not working correctly, need to be fixed
10405-00_NAZITB00OLE-GPON-1/1/14/141411405-00_NAZITB00OLE-GPON-1/1/11/11405-00_NAZITB00OLE-GPON-1/1/11/14
11231-00_SHBRKH00OL6-GPON-1/1/14/141411231-00_SHBRKH00OL6-GPON-1/1/11/11231-00_SHBRKH00OL6-GPON-1/1/11/14
12701-00_KMISRRACOL1-GPON-1/1/14/141411701-00_KMISRRACOL1-GPON-1/1/11/11701-00_KMISRRACOL1-GPON-1/1/11/14
13213-00_MSLMKH00OL6-GPON-1/1/14/141411213-00_MSLMKH00OL6-GPON-1/1/11/11213-00_MSLMKH00OL6-GPON-1/1/11/14
Sheet1
Cell Formulas
RangeFormula
C2:C8C2=IF(B2>12,B2-3,B2)
D2:D13D2=SUBSTITUTE(A2, MID(A2, FIND("/", A2, FIND("/", A2) + 1) + 1, FIND("/", A2, FIND("/", A2, FIND("/", A2) + 1) + 1) - FIND("/", A2, FIND("/", A2) + 1) - 1), C2)
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
How about
Fluff.xlsm
ABCD
1Short nameLT \minus 3Final ShotName
2707-00_BYSHJZ00OL0-GPON-1/1/1/611707-00_BYSHJZ00OL0-GPON-1/1/1/6
3117-00_ESKNRD00OL3-GPON-1/1/16/11613117-00_ESKNRD00OL3-GPON-1/1/13/1
4707-00_BYSHJZ00OL0-GPON-1/1/1/711707-00_BYSHJZ00OL0-GPON-1/1/1/7
5414-00_KYBRDN00OL1-GPON-1/1/19/11916414-00_KYBRDN00OL1-GPON-1/1/16/1
6241-00_RABGKH00OL1-GPON-1/1/19/21916241-00_RABGKH00OL1-GPON-1/1/16/2
7213-00_MSLMKH00OL8-GPON-1/1/5/555213-00_MSLMKH00OL8-GPON-1/1/5/5
8707-00_BYSHJZ00OL0-GPON-1/1/3/633707-00_BYSHJZ00OL0-GPON-1/1/3/6
9429-00_RNUNDN00OL8-GPON-1/1/14/141411429-00_RNUNDN00OL8-GPON-1/1/11/14
10405-00_NAZITB00OLE-GPON-1/1/14/141411405-00_NAZITB00OLE-GPON-1/1/11/14
11231-00_SHBRKH00OL6-GPON-1/1/14/141411231-00_SHBRKH00OL6-GPON-1/1/11/14
12701-00_KMISRRACOL1-GPON-1/1/14/141411701-00_KMISRRACOL1-GPON-1/1/11/14
13213-00_MSLMKH00OL6-GPON-1/1/14/141411213-00_MSLMKH00OL6-GPON-1/1/11/14
Data
Cell Formulas
RangeFormula
C2:C8C2=IF(B2>12,B2-3,B2)
D2:D13D2=REPLACE(A2,FIND("/"&B2,A2),LEN(C2)+1,"/"&C2)
 
Upvote 0
Solution
@Fluff
Thanks Man you are a life saver, save around 12 hrs to manual time. thanks a ton.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,217,391
Messages
6,136,325
Members
450,005
Latest member
BigPaws

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