Get values from one cell to different cells without text

Jyotirmaya

Board Regular
Joined
Dec 2, 2015
Messages
205
Office Version
  1. 2019
Platform
  1. Windows
I have data in Column A, like example 788 to 1247, in B & C Column I want the values 788 and 1247 without the Word "TO" & without any spaces before or after. Kindly help me with the code or formula
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi,

Would this work for you, results converted to Real Numbers.
If you want a single formula, use B3 formula dragged across:

Book3.xlsx
ABC
1788 to 12477881247
279 TO 123477912347
3789 To 12477891247
480 TO 123478012347
Sheet998
Cell Formulas
RangeFormula
B1:B2B1=LEFT(A1,SEARCH("to",A1)-1)+0
C1:C2C1=MID(A1,SEARCH("to",A1)+2,99)+0
B3:C4B3=MID(SUBSTITUTE(LOWER($A3),"to",REPT(" ",99)),COLUMNS($B3:B3)*99-99+1,99)+0
 
Last edited:
Upvote 0
Hi,

Would this work for you, results converted to Real Numbers.
If you want a single formula, use B3 formula dragged across:

Book3.xlsx
ABC
1788 to 12477881247
279 TO 123477912347
3789 To 12477891247
480 TO 123478012347
Sheet998
Cell Formulas
RangeFormula
B1:B2B1=LEFT(A1,SEARCH("to",A1)-1)+0
C1:C2C1=MID(A1,SEARCH("to",A1)+2,99)+0
B3:C4B3=MID(SUBSTITUTE(LOWER($A3),"to",REPT(" ",99)),COLUMNS($B3:B3)*99-99+1,99)+0
Thank You
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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