Left Mid Right help

rex759

Well-known Member
Joined
Nov 8, 2004
Messages
608
Office Version
  1. 365
Platform
  1. Windows
Hello,
I’m attempting to extract the number after FW, (9,10, 11) so I can add them to something else. The length of the cell including spaces is 17 for single digits (1-9) and 18 for double digits (10-15)

I tried this which works for double digits but not getting the correct results.

Any ideas?

Thanks
South Atlantic.xls
BCDE
1
22/1/2010(FW1)17
32/8/2010(FW2)16
42/15/2010(FW3)15
52/22/2010(FW4)14
63/1/2010(FW5)13
73/8/2010(FW6)12
83/15/2010(FW7)11
93/22/2010(FW8)10
103/29/2010(FW9)9
114/5/2010(FW10)10
124/12/2010(FW11)11
134/19/2010(FW12)12
144/26/2010(FW13)13
155/3/2010(FW14)14
165/10/2010(FW15)15
175/17/2010(FW16)16
185/24/2010(FW17)17
195/31/2010(FW18)18
206/7/2010(FW19)19
Sheet1
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi,

For double-digits use:

=LEFT(RIGHT(B11,3),2)

For single-digits use:

=LEFT(RIGHT(B11,2),1)

HTH
 
Upvote 0
This should work, but one of the other solutions seems neater...

=MID(MID(A2,FIND("(",A2),255),FIND(" ",MID(A2,FIND("(",A2),255))+1,FIND(")",MID(A2,FIND("(",A2),255))-LEN(MID(A2,FIND("(",A2),255))+1)
 
Upvote 0
Correction:

=LEFT(RIGHT(S3,3),2)

works for double- & single-digits, in further calculations the extra space (e.g. " 9") is omitted.

thumbup.gif
 
Upvote 0
The following formula also works ... for both mddyyyy and mmddyyyy:

=IF(A2>0,LEFT(A2,IF(LEN(A2)=7,1,IF(LEN(A2)=8,2)))&"/"&LEFT(RIGHT($A2,6),2)&"/"&RIGHT(A2,4),"")

<TABLE style="WIDTH: 96pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=128 border=0 x:str><COLGROUP><COL style="WIDTH: 48pt" span=2 width=64><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 48pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=64 height=17>Original</TD><TD class=xl23 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 48pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: silver" width=64>Formula</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num>3012007</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: silver" x:fmla='=IF(A2>0,LEFT(A2,IF(LEN(A2)=7,1,IF(LEN(A2)=8,2)))&"/"&LEFT(RIGHT($A2,6),2)&"/"&RIGHT(A2,4),"")'>3/01/2007</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17> </TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: silver" x:str="" x:fmla='=IF(A3>0,LEFT(A3,IF(LEN(A3)=7,1,IF(LEN(A3)=8,2)))&"/"&LEFT(RIGHT($A3,6),2)&"/"&RIGHT(A3,4),"")'> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl26 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17 x:num>6121947</TD><TD class=xl25 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: silver" x:fmla='=IF(A4>0,LEFT(A4,IF(LEN(A4)=7,1,IF(LEN(A4)=8,2)))&"/"&LEFT(RIGHT($A4,6),2)&"/"&RIGHT(A4,4),"")'>6/12/1947</TD></TR></TBODY></TABLE>

Thanks for helping me develop that formula Mr. Excel -- I couldn't have done it without you smart people.
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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