Split sentence into rows - No wrapping

cshetty

Board Regular
Joined
Apr 15, 2017
Messages
76
Office Version
  1. 2016
Platform
  1. Windows
I have a tricky requirement. (Tricky for me )

My sentence in excel cell is "US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND SEVEN HUNDRED FIFTY SEVEN ONLY"

I need to print this on a pre printed pay-order stationery. The width of the line is limited on the stationery. I can print up to US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND SEVEN HUNDRED on the first line and FIFTY SEVEN ONLY should go to the next line on the stationery.

I tried with wrapping the text in excel cell, but one of sentence prints on the line of the stationery.
Is there a way to split the line using a formula so that i can distribute the line into two rows.

Hope i have explained my query properly.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
The formula you can use would be:

=CONCATENATE(A1, CHAR(10), B1)

Where A1 is the cell containing "US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND SEVEN HUNDRED" and B1 is the cell containing "FIFTY SEVEN ONLY". The CHAR(10) function will insert a line break between the two cells, causing the second part to be printed on a new line on your pre-printed pay-order stationery.
 
Upvote 0
The formula you can use would be:

=CONCATENATE(A1, CHAR(10), B1)

Where A1 is the cell containing "US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND SEVEN HUNDRED" and B1 is the cell containing "FIFTY SEVEN ONLY". The CHAR(10) function will insert a line break between the two cells, causing the second part to be printed on a new line on your pre-printed pay-order stationery.
Thanks for the reply.

This doesnt serve the purpose dear.

Let me explain in detail.
in A1 cell the text is - US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND SEVEN HUNDRED FIFTY SEVEN ONLY

Now i need to split this text between two cells. B1 & B2

But B1 and B2 has a fixed width which matches with the pre-printed form. SO in the above case i want US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND SEVEN HUNDRED in B1 and remaining text in B2. (This may change as the text changes). This is basically depend on the width of B1 and B2.
 
Upvote 0
Hello,

See if this helps

Book1
A
1US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND SEVEN HUNDRED FIFTY SEVEN ONLY
2US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND SEVEN HUNDRED
3FIFTY SEVEN ONLY
Sheet1
Cell Formulas
RangeFormula
A2A2=MID(A1,1,FIND("HUNDRED",A1,FIND("THOUSAND",A1,1))+6)
A3A3=MID(A1,FIND("HUNDRED",A1,FIND("THOUSAND",A1,1))+8,99)
Thank you for the reply.

Cell A1 text keeps changing, which need to be split between A2 and A3 which has fixed column width.
Please have a look at the image for better understanding.
Thank you in advance.
 

Attachments

  • SS.jpg
    SS.jpg
    26.8 KB · Views: 7
Upvote 0
Thank you for the reply.

Cell A1 text keeps changing, which need to be split between A2 and A3 which has fixed column width.
Please have a look at the image for better understanding.
Thank you in advance.
What is the column width then ??
 
Upvote 0
Try. A1= "your Data"
In A2
Excel Formula:
=LEFT(A1,FIND(" ",A1,INT(LEN(A1)/2))-1)
In A3
Excel Formula:
=SUBSTITUTE(A1,A2&" ","")
A1US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND SEVEN HUNDRED FIFTY SEVEN ONLY
A2US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND
A3SEVEN HUNDRED FIFTY SEVEN ONLY
 
Upvote 0
Try. A1= "your Data"
In A2
Excel Formula:
=LEFT(A1,FIND(" ",A1,INT(LEN(A1)/2))-1)
In A3
Excel Formula:
=SUBSTITUTE(A1,A2&" ","")
A1US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND SEVEN HUNDRED FIFTY SEVEN ONLY
A2US DOLLARS NINE HUNDRED SIXTY EIGHT THOUSAND
A3SEVEN HUNDRED FIFTY SEVEN ONLY
Thanks for the reply.

So, in this case the whole text in A1 is split into almost half. (Hope I understood correctly)
What if A1 has a shorter length?
For example, "US Dollars One Million Only" (The formula splits this as well, though the whole length can fit in A2 leaving A3 blank.
 
Upvote 0

Forum statistics

Threads
1,215,072
Messages
6,122,968
Members
449,095
Latest member
Mr Hughes

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