Is there a formula that allows you to delete everything after a line break in a cell?

For example, I have several cells that have something that looks like this......

12345
12345

....in the same cell. What I need is this:

12345

(These cells are all in the same column, but it's column B, C and D - and they are merged. In this file, the cell with the numbers in it have several empty cells in between them. For example, the first one would be in cell B14, then there will be several empty cells in column B, and then the next one would be in cell B54, and so on. And like I said, columns B, C and D are merged, so that makes it tricky.)

I know how to remove line breaks, but that just gives me something like 1234512345, and in this case I really can't use an =LEFT or =RIGHT formula because all of my selections aren't 5 digits long (some are 4 digits long, some are 3, etc.) so that wouldn't really be saving me much time. (Besides that, whenever I try to find/replace a line break by typing Alt+010 in the "Find" box, that renders Excel unable to find and replace anything - it gives me an error message telling me that "Microsoft Excel cannot find any matching data to replace," etc., and can only be fixed by closing Excel and opening it again. So that's pretty much out of the question.)

I'm not an Excel expert by any means...All I need to do is remove everything after that first line in the cell (including the line break). Is there a simple way to do this (without creating userdefined functions)???

Thanks in advance!