Moving part of a cell to another cell

lisaboneal

New Member
Joined
Aug 17, 2018
Messages
4
Hello, I am a basic excel user and now I have this huge conversion project and I am freaking out!

Here is my question:
I have this info in a cell:
6500-Operating & Maintenance:6515-Supplies:6515-01-Janitorial

I need to move 6515-01 to another cell. Could some kind soul help me with a formula that will do that, please?

I have the formula that will move 6515 to another cell, but I can't figure this one out.

Thanks in advance!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi,

Does this help:


Book1
AB
16500-Operating & Maintenance:6515-Supplies:6515-01-Janitorial6515-01
Sheet189
Cell Formulas
RangeFormula
B1=TRIM(LEFT(SUBSTITUTE(MID(SUBSTITUTE(A1,":",REPT(" ",255),2),255,255),"-",REPT(" ",255),2),255))
 
Upvote 0
I have this info in a cell:
6500-Operating & Maintenance:6515-Supplies:6515-01-Janitorial

I need to move 6515-01 to another cell.
Will the text you want to move always follow the word "Supplies:" (with the colon after it)?

Is the text you want always four digits followed by a dash followed by two more digits?
 
Upvote 0
The text will always be four digits followed by a dash followed by two more digits. It will not always follow the word Supplies, but it will always follow a colon.
 
Upvote 0
The text will always be four digits followed by a dash followed by two more digits. It will not always follow the word Supplies, but it will always follow a colon.

Will it always follow the second colon as it does in the single example that you posted?

If not, will it be the only text with four digits to the left of a dash and two digits to the right of that same dash in the text in the cell?
 
Upvote 0
Yes, it will always follow the second colon. I have the formula for the number following the first colon, but I cannot figure out how to make it work with the number following the second colon. Thanks!
 
Upvote 0
I received this formula:
=MID(A1,FIND(":",A1,FIND(":",A1,1)+1)+1,7) from another source and it works!
Is there an easy way to add to this formula to make it work if there is a fourth number behind a colon in the same text line?
I tried the other formula given here but I couldn't make it work.
 
Upvote 0
When I tried the formula supplied by jtakw on the data supplied by you, I got this as a result:
6515-01
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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