ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Advanced text function (combining text) (https://www.excelbanter.com/excel-worksheet-functions/181602-advanced-text-function-combining-text.html)

Johan[_2_]

Advanced text function (combining text)
 
Excel 2000 without add-ons
I have two cells that contains text cell1:"20/30" and cell2: "45/100"
I would like two formulas that combines the first part, or the second
part of the cells and gives me the result "20/45"and in another cell
"30/100"
This I could do with the formulas
=LEFT(cell1,2)&"/"& LEFT(cell2,2)
And
=RIGHT(cell1,2)&"/"& RIGHT(cell2,3)

The problem I have is that the cells I would like to combine can have
different number of characters for example "1/50" and "33/888" In this
case I would like the result "1/33" and "50/888"
There can be minimum" 0/10 and 0/100" and maximum "99/99 and 999/999"
in the cells I would like to combine.

Can anyone help me with the two formulas that I'm looking for?

Thanks!

ND Pard

Advanced text function (combining text)
 
Assume:
cell a2 contains the text 1/33

cell B2 contains the text 33/888

To obtain your desired results enter the following formula in a blank cell:

=""&LEFT(A1,FIND("/",A1,1))&LEFT(B1,FIND("/",B1,1)-1)

In another blank cell enter the formula:

=""&MID(A1,FIND("/",A1,1)+1,100)&MID(B1,FIND("/",B1,1),100)

I used 100 as the last paramater of the Mid Function; however, if your
largest number is three (3) characters in length, you could replace it with
3. Either way, you'll get the same results.

I hope that helps. Good Luck.

"Johan" wrote:

Excel 2000 without add-ons
I have two cells that contains text cell1:"20/30" and cell2: "45/100"
I would like two formulas that combines the first part, or the second
part of the cells and gives me the result "20/45"and in another cell
"30/100"
This I could do with the formulas
=LEFT(cell1,2)&"/"& LEFT(cell2,2)
And
=RIGHT(cell1,2)&"/"& RIGHT(cell2,3)

The problem I have is that the cells I would like to combine can have
different number of characters for example "1/50" and "33/888" In this
case I would like the result "1/33" and "50/888"
There can be minimum" 0/10 and 0/100" and maximum "99/99 and 999/999"
in the cells I would like to combine.

Can anyone help me with the two formulas that I'm looking for?

Thanks!


ND Pard

Advanced text function (combining text)
 
Oops ... typo err ... try this:
Assume:
cell A1 contains the text 1/33

cell B1 contains the text 33/888

To obtain your desired results enter the following formula in a blank cell:

=""&LEFT(A1,FIND("/",A1,1))&LEFT(B1,FIND("/",B1,1)-1)

In another blank cell enter the formula:

=""&MID(A1,FIND("/",A1,1)+1,100)&MID(B1,FIND("/",B1,1),100)

I used 100 as the last paramater of the Mid Function; however, if your
largest number is three (3) characters in length, you could replace it with
3. Either way, you'll get the same results.

I hope that helps. Good Luck.


"ND Pard" wrote:

Assume:
cell a2 contains the text 1/33

cell B2 contains the text 33/888

To obtain your desired results enter the following formula in a blank cell:

=""&LEFT(A1,FIND("/",A1,1))&LEFT(B1,FIND("/",B1,1)-1)

In another blank cell enter the formula:

=""&MID(A1,FIND("/",A1,1)+1,100)&MID(B1,FIND("/",B1,1),100)

I used 100 as the last paramater of the Mid Function; however, if your
largest number is three (3) characters in length, you could replace it with
3. Either way, you'll get the same results.

I hope that helps. Good Luck.

"Johan" wrote:

Excel 2000 without add-ons
I have two cells that contains text cell1:"20/30" and cell2: "45/100"
I would like two formulas that combines the first part, or the second
part of the cells and gives me the result "20/45"and in another cell
"30/100"
This I could do with the formulas
=LEFT(cell1,2)&"/"& LEFT(cell2,2)
And
=RIGHT(cell1,2)&"/"& RIGHT(cell2,3)

The problem I have is that the cells I would like to combine can have
different number of characters for example "1/50" and "33/888" In this
case I would like the result "1/33" and "50/888"
There can be minimum" 0/10 and 0/100" and maximum "99/99 and 999/999"
in the cells I would like to combine.

Can anyone help me with the two formulas that I'm looking for?

Thanks!



All times are GMT +1. The time now is 10:01 PM.

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