How to do LEFT/RIGHT/some other formula to return only top part of text from a box?

Jyggalag

Active Member
Joined
Mar 8, 2021
Messages
445
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi all,

I have a lot of cells that look like this:

1670233884992.png


Now, what I would like, is to have a formula that returns ONLY the top part of cell A3

I have separated the texts by pressing ALT + ENTER and then typing:

Test 1
Test 2
Test 3

instead of

Test 1 Test 2 Test 3

Is there a way in which I can get a formula to recognize this and only return the top part of the cell?

Thank you all! :)

Kind regards,
Jyggalag
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Excel Formula:
=LEFT(A3,FIND(CHAR(10),A3)-1)

should do it.
 
Upvote 0
Solution
Alternatively:

Excel Formula:
=@TEXTSPLIT(A1,CHAR(10))

Or;

Excel Formula:
=TEXTBEFORE(A1,CHAR(10))
 
Upvote 0

Forum statistics

Threads
1,223,879
Messages
6,175,148
Members
452,615
Latest member
bogeys2birdies

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