ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Extracting a number from a multiline-entry (https://www.excelbanter.com/excel-programming/440967-re-extracting-number-multiline-entry.html)

andreashermle

Extracting a number from a multiline-entry
 
On 22 Mrz., 11:23, Mike H wrote:
Hi,

Like this

=LOOKUP(6.022*10^23,--LEFT(A1,ROW(INDIRECT("1:"&LEN(A1)))))

or if there could be a leading zero you want to retain the slightly longer

=LEFT(A1,SUMPRODUCT(--ISNUMBER(-MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))))

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.



"andreashermle" wrote:
Dear Experts:


I would like to extract a number from multi-line excel cells. The
cells have the following make-up


123456(manual line break = Alt+Enter)
sample text (manual line break = Alt+Enter)
sample text


In the above example I would like to extract the number located
immediately before the first manual line break and display it in a
separate cell. Can this be done using a formula/function?


Help is much appreciated. Thank you very much in advance.


Regards, Andreas
.- Zitierten Text ausblenden -


- Zitierten Text anzeigen -


To all of you: Rick, Ron, Mike:

Thank you very much for your terrific support. I really appreciate it.
I am gonna test all the solutions in the coming days and let you know
how everything works.
GREAT SUPPORT.

Regards, Andreas


All times are GMT +1. The time now is 12:31 PM.

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