On 04/21/2016 03:43 PM, Piet van Oostrum wrote:
John R. Sowden wrote:
> I have an accounting ledger in calc, with two columns in question.
>
> col 1 is credit (amount charged to account) and col 2 is the account
> number (a 4 digit number currently formatted a number with no decimal,
> but not text).
>
> My objective is to sum the amounts in column 1 if col 2=1234. Not a
> problem. Done.
>
> Now I want to sum the amounts in column 1 if the number in col 2 is 1234
> or 2345 or 6789)
> I tried just putting the numbers in the sumif field, I tried putting
> them in parentheses, and finally I tried the OR() function by making
> the criteria field in sumif OR(1234,2345,6789).
>
> No dice. Two questions:
> 1) what is the solution to my problem?
> 20 Where can I go for more reference material than the help screen to
> solve these little problems?
>
> thanks,
> John
You could use a regular expression for the criterium. You will have to enable
regular expressions in formulas.
=SUMIF(B5:B10;"1234|2345|6789";A5:A10)
Look in the Calc Guide.
Thank you all. It worked. By the way Regular Expression is on by
default, as I would not have touched it as I didn't know what effect it
would have. Your responses open up more possibilities!
John
--
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted