Break cell value

GUY08347

Board Regular
Joined
Jul 3, 2006
Messages
87
Hi there,
i have a list of image dimentions layed out in a sheet from cells c2:c221
it looks like:

1140x223
1201x250
1000x600
1440x900
... and so... to c221

i want to break each one, with a macro, so that i will have:
in d1: 1140 in e1 223
in d2: 1201 in e2 250
.....
...

thank you,
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
If you need to leave the original data in column C, then you could use these formulae in columns D and E to get the result.
Excel Workbook
CDE
11140x2231140223
21201x2501201250
31000x6001000600
41440x9001440900
Sheet1
Excel 2010
Cell Formulas
RangeFormula
D1=LEFT(C1,FIND("x",C1)-1)
D2=LEFT(C2,FIND("x",C2)-1)
D3=LEFT(C3,FIND("x",C3)-1)
D4=LEFT(C4,FIND("x",C4)-1)
E1=RIGHT(C1,LEN(C1)-FIND("x",C1))
E2=RIGHT(C2,LEN(C2)-FIND("x",C2))
E3=RIGHT(C3,LEN(C3)-FIND("x",C3))
E4=RIGHT(C4,LEN(C4)-FIND("x",C4))


Note that this will leave the results as text, so if you need numbers just add "+0" to the end of each formula to have the results shown as a number.

Hope that helps.
 
Upvote 0
Could you just copy all of the cells into column D, and then do Text to Columns with "x" as your delimiter?
That would certainly work but there is no need to copy the data first - step 3 of the wizard allows you to specify where the results should go and you could just enter D2 there.
 
Upvote 0
That would certainly work but there is no need to copy the data first - step 3 of the wizard allows you to specify where the results should go and you could just enter D2 there.

True, I was assuming that the original data format needed to remain entact.
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,634
Members
452,934
Latest member
Jdsonne31

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