Extract numbers to left of :

sobrien1234

Board Regular
Joined
May 10, 2016
Messages
175
Office Version
  1. 365
Platform
  1. Windows
I have a list of numbers in column 8 as follows:

1:1-5-4
13:8-3-4
44:22-11-11

I want a formula in column B that extracts the numbers to the left of : - so the answers would be
1
13
44

I want a formula in column C that extracts the numbers to the right of : - so the answer would be:
1
8
22

Thanks in advance
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
I recommend you to format the content of column A as text, my excel went crazy with those numbers of yours otherwise.

Traductor de Formulas - copia.xlsm
ABC
11:1-5-411
213:8-3-4138
344:22-11-114422
Hoja4
Cell Formulas
RangeFormula
B1:B3B1=LEFT(A1,SEARCH(":",A1)-1)
C1:C3C1=MID(A1,SEARCH(":",A1)+1,SEARCH("-",A1)-SEARCH(":",A1)-1)


Column B looks for ":" and extracts the left.

Column C looks for ":" and "-" and extracts wha tis in between.
 
Upvote 0
Another option
+Fluff New.xlsm
ABC
1
21:1-5-411
313:8-3-4138
444:22-11-114422
Master
Cell Formulas
RangeFormula
B2:B4B2=LEFT(A2,SEARCH(":",A2&":")-1)
C2:C4C2=TRIM(LEFT(SUBSTITUTE(REPLACE(A2,1,LEN(B2)+1,""),"-",REPT(" ",100),1),100))
 
Upvote 0
I recommend you to format the content of column A as text, my excel went crazy with those numbers of yours otherwise.

Traductor de Formulas - copia.xlsm
ABC
11:1-5-411
213:8-3-4138
344:22-11-114422
Hoja4
Cell Formulas
RangeFormula
B1:B3B1=LEFT(A1,SEARCH(":",A1)-1)
C1:C3C1=MID(A1,SEARCH(":",A1)+1,SEARCH("-",A1)-SEARCH(":",A1)-1)


Column B looks for ":" and extracts the left.

Column C looks for ":" and "-" and extracts wha tis in between.
Excellent thanks - and thanks for the detailed explanation. Much appreciated.
 
Upvote 0
Another option
+Fluff New.xlsm
ABC
1
21:1-5-411
313:8-3-4138
444:22-11-114422
Master
Cell Formulas
RangeFormula
B2:B4B2=LEFT(A2,SEARCH(":",A2&":")-1)
C2:C4C2=TRIM(LEFT(SUBSTITUTE(REPLACE(A2,1,LEN(B2)+1,""),"-",REPT(" ",100),1),100))
Thank you - much appreciated!
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

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