I have a data set which has two columns of interest for this issue, which we'll call A and R (since they aren't adjacent in the listing right now).
Column A contains numbers or "N/A" if the field is invalid (based on other data, why it's that way isn't important).
Column R contains "Y" or "N" to designate a condition about the item represented by the row it's on.
What I need:
1) The largest number in column A but only counting those lines where the corresponding R column is "Y".
2) The largest number in column A but only counting those lines where the corresponding R column is "N".
(The above two are separate things.)
So if you had:
A R
5 Y
2 Y
3 N
4 N
1 Y
4 N
Request 1 returns 5, request 2 returns 4 (because 4 is the largest number where R is also "N", so even though the first row has a 5 in it, R is "Y" so it isn't counted).
Any ideas?
Largest If?
Re: Largest If?
=MAX(IF(R1:R6="Y";A1:A6;"")) entered as array formula with Ctrl+Shift+Enter
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Largest If?
It is achievable with the MAXIFS() function.
The MAXIFS() function exists in the LibreOffice Calc, but not exist in the AOO Calc.
One more approach: you can write a macro function for this task.
The MAXIFS() function exists in the LibreOffice Calc, but not exist in the AOO Calc.
One more approach: you can write a macro function for this task.
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: Largest If?
Note: the formulae below are array formula and need to be entered in the input line, then press Ctrl-Shift-Enter - they will then appear enclosed in {} curly braces. Assuming values in A1 to A6 and conditions in R1 to R6.
For Y:
and for N
For Y:
Code: Select all
=MAX(IF(R1:R6="Y";A1:A6))
Code: Select all
=MAX(IF(R1:R6="N";A1:A6))
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers