ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   TTC delimiter restriction (https://www.excelbanter.com/excel-discussion-misc-queries/266676-ttc-delimiter-restriction.html)

inequitude

TTC delimiter restriction
 
Hi guys- pretty simple question I suppose for someone who knows their stuff.
I have a column of data which looks like this-

A1: ,08-5x1,,49
A2: ,08-5x1,,56
A3: ,10-10x1,,50
A4: ,10-10x3,,26
A5: ,10-14x1,,46
A6: ,10-19x1,,32

Etc.

As a result I need the second and third number to multiply together in a new cell.

So the answer to above would be
B1: 5 (5x1)
B2: 5 (5x1)
B3: 10 (10x1)
B4: 30 (10x3)
B5: 14 (14x1)
B6: 19 (19x1)

etc.

I have tried to use the text to columns function but this fails to help in two regards- when you use the fixed width to separate the multipliers out into new cells, it wont work because some are single and some double digits.
When I use a delimited TTC there are not enough delimiter options for me to separate out the data I need from everything else which is in there.

I can get the answer in a couple of steps without a problem, but I am hoping to have one formula which will do this.

What is the best way to do this?
Any advice?

Cheers,
Chris.

wickedchew

Quote:

Originally Posted by inequitude (Post 960465)
Hi guys- pretty simple question I suppose for someone who knows their stuff.
I have a column of data which looks like this-

A1: ,08-5x1,,49
A2: ,08-5x1,,56
A3: ,10-10x1,,50
A4: ,10-10x3,,26
A5: ,10-14x1,,46
A6: ,10-19x1,,32

Etc.

As a result I need the second and third number to multiply together in a new cell.

So the answer to above would be
B1: 5 (5x1)
B2: 5 (5x1)
B3: 10 (10x1)
B4: 30 (10x3)
B5: 14 (14x1)
B6: 19 (19x1)

etc.

I have tried to use the text to columns function but this fails to help in two regards- when you use the fixed width to separate the multipliers out into new cells, it wont work because some are single and some double digits.
When I use a delimited TTC there are not enough delimiter options for me to separate out the data I need from everything else which is in there.

I can get the answer in a couple of steps without a problem, but I am hoping to have one formula which will do this.

What is the best way to do this?
Any advice?

Cheers,
Chris.

=(MID(A1,FIND("-",A1)+1,FIND("x",A1)-FIND("-",A1)-1))*(MID(A1,FIND("x",A1)+1,FIND(",,",A1)-FIND("x",A1)-1))

inequitude

Quote:

Originally Posted by wickedchew (Post 960487)
=(MID(A1,FIND("-",A1)+1,FIND("x",A1)-FIND("-",A1)-1))*(MID(A1,FIND("x",A1)+1,FIND(",,",A1)-FIND("x",A1)-1))

Champion mate- worked a treat.
For future reference, if possible, could you explain above?


All times are GMT +1. The time now is 06:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com