Hi,
I have come across a problem which I cannot seem to solve on my own. I have the following situation:
ID Value
A 1.5
A 1.5
B 2.5
A 4
And I would like to select the largest value for a given value:
ID Value
A 4
B 2.5
Any suggestions to achieve this by code?
Thanks in advance
[Solved] Find largest conditional value
[Solved] Find largest conditional value
Last edited by Alexie on Sat Jan 12, 2019 7:49 pm, edited 1 time in total.
OpenOffice 4.1.1 on Windows 10
Re: Find largest conditional value
One way to do this is with a Pivot Table (menu item Data -> Pivot Table). Right click on the table in the attached document and select Edit Layout to see how I set it up. You can double click on the item that says Max Value to see other options for calculating statistical properties of the Value column.
- Attachments
-
- MaxByID.ods
- (8.83 KiB) Downloaded 91 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Find largest conditional value
You can also use an array formula. Enter the formula
but finish by pressing CTRL+Shift+Enter. The formula will then be enclosed in curly braces {}.
Code: Select all
=MAX(IF(A2:A10 = "a";B2:B10;""))
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Find largest conditional value
Similar topic:
viewtopic.php?t=88118&p=413996
viewtopic.php?t=88118&p=413996
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Find largest conditional value
I tried the suggested solution in the above thread.
It works! Many thanks for your replies!
It works! Many thanks for your replies!
OpenOffice 4.1.1 on Windows 10