Date: prev next · Thread: first prev next last
2021 Archives by date, by thread · List index


At 01:13 18/10/2021 +0200, Rob Jasper wrote:
I have the following question:

If, as here, you prepare your question as a reply to a previous message when it is nothing of the sort, it will be lost in the previous thread and may not be seen by possible helpers.

I have in column A value either a number, or string in the format <NR>+<NR>, ...

Nauru? Norwich postcodes? National Rail? Noise reduction?

... in col B I want to calculate what's in Col A
e.g.:
      10        10
12+72   84
      33        33
66+72   138

So, I tired the formula =INDIRECT("="&A1) but I only get REF! What am I doing wrong here, ...

Probably thinking INDIRECT() does something different from what it does.

... and how can I achieve what I want?

First solution: don't enter your data like that in the first place.

I don't think there is any simple method to do what you ask in a general fashion. If, as you suggest, the operator is always "+", you could use
=IF(ISNUMBER(A1);A1;LEFT(A1;FIND("+";A1)-1)+MID(A1;FIND("+";A1)+1;99))
You could make this simpler if you knew that the numbers in the expressions were always of two digits.

I trust this helps.

Brian Barker


--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.