number separation

badmi

New Member
Joined
May 27, 2019
Messages
11
Hi all,
I have a situation, wherein i need to separate the below numbers and will be input to other info.

1.5 X 3 X 8
3 X 1.5 X 10

I need to get first numbers-1.5
3
I need to get Mid numbers- 3
1.5
and note there is space and X for mid numbers.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi all,
I have a situation, wherein i need to separate the below numbers and will be input to other info.

1.5 X 3 X 8
3 X 1.5 X 10

I need to get first numbers-1.5
3
I need to get Mid numbers- 3
1.5
and note there is space and X for mid numbers.
What about the 8 and 10... you do not need to separate them out?

Do you actually mean there is a space and X and another space for mid numbers?

When you say you need to separate them... you mean into adjacent cells, correct? Or is this a VBA question and you need them in variables?
 
Last edited:
Upvote 0
Point 2-yes there is a space
Point 3-yes i need them in adjacent cells. It is not a VBA question.
 
Upvote 0
Assuming your values start in cell A1, put this formula in cell B1 and copy it across to Column C (or Column D if you want all three numbers)...

=0+TRIM(MID(SUBSTITUTE(" X "&$A1," X ",REPT(" ",99)),COLUMNS($B:B)*99,99))
 
Upvote 0
Thank you Sir.
I almost got it.
But if required output are one below the other in column.
 
Upvote 0
Thank you Sir.
I almost got it.
But if required output are one below the other in column.
I'm about to go to sleep, so I may not answer your response for awhile unless you respond quickly.

So if you have, say, 1 X 2 X 3 in cell A1, then you want the 1 in cell A2, the 2 in cell A3 (and possibly the 3 in cell A4), is that correct?

If so, where is your second value... cell B1? Or was it in cell A2 but got pushed down to cell A4 (or possibly A5 if three values are retrieved)?

In other words, exactly how is your existing data laid out and where exactly to you want the output to go to?
 
Upvote 0
Are you saying the "1 X 2 X 3" is in cell A1 and afterwards you want the 1 to remain in cell A1 but the 2 and 3 to be split down under it? If so, that cannot be done with formulas as it would require the value and a formula operating on it to be in the same cell which Excel cannot do. So, if that is your layout and need, then you will need a VBA macro to accomplish what you want. So, did you really mean "1 X 2 X 3" is in cell A1 and so it the 1 afterwards?
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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