[Solved] Combining 2 IF(AND) tests

Discuss the spreadsheet application

[Solved] Combining 2 IF(AND) tests

Postby michaelz7 » Fri Nov 08, 2019 5:20 am

hello,

I have read what I could find online and in other answers in this fine forum but need to ask for help.

I would like to combine the following 2 IF(and) tests looking for return of TRUE if either is true.

=IF(AND(J9=1);(F9+G9+H9>45000))

=IF(AND(J9=2);(F9+G9+H9>30000))

I've read some answers on this site from very talented and experienced folks. I hope my goal is doable. Have tried many iterations but without success.
Thank You.
michael

:crazy:
Last edited by robleyd on Fri Nov 08, 2019 6:11 am, edited 1 time in total.
Reason: Tagged [Solved]
Apache OpenOffice 4.1.7 Mac OS 10.11.6
michaelz7
 
Posts: 3
Joined: Fri Nov 08, 2019 5:14 am

Re: Combining 2 IF(AND) tests

Postby robleyd » Fri Nov 08, 2019 5:36 am

Seems like you need an OR to select if either AND is TRUE; maybe something like
Code: Select all   Expand viewCollapse view
=IF( OR ( AND ( J9=1 ; F9+G9+H9>45000 ) ; AND ( J9=2 ; F9+G9+H9>30000 ) ) ; 1; 0)

Substitute whatever you need for 1 - TRUE and 0 - FALSE
Cheers
David
Apache OpenOffice 420m2(Build:9821) - Slackware 14.2 - 64 bit
LibreOffice 6.0.7.3 - Slackware 14.2 - 64 bit
Apache OpenOffice 4.1.4 - Windows 7 Virtual machine
User avatar
robleyd
Moderator
 
Posts: 3145
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Combining 2 IF(AND) tests

Postby michaelz7 » Fri Nov 08, 2019 6:02 am

That works perfectly David. Thank you very much.

I love OpenOffice. Thank you Apache. So glad to not use Gatesware.

Again, David I appreciate the very quick reply to my question, and elegant solution of yours.

Good night, from frosty Oshkosh, WI USA.

:bravo:
Apache OpenOffice 4.1.7 Mac OS 10.11.6
michaelz7
 
Posts: 3
Joined: Fri Nov 08, 2019 5:14 am

Re: Combining 2 IF(AND) tests

Postby MrProgrammer » Fri Nov 08, 2019 6:10 am

Hi, and welcome to the forum.

michaelz7 wrote:I would like to combine the following 2 IF(and) tests looking for return of TRUE if either is true.
=IF(AND(J9=1);(F9+G9+H9>45000))
=IF(AND(J9=2);(F9+G9+H9>30000))
=SUMPRODUCT(J9={1|2};F9+G9+H9>{45000|30000})

[Tutorial] The SUMPRODUCT function

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.

[Tutorial] Ten concepts that every Calc user should know
Mr. Programmer
AOO 4.1.7 Build 9800 on MacOS 10.14.6.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
MrProgrammer
Moderator
 
Posts: 3953
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: [Solved] Combining 2 IF(AND) tests

Postby michaelz7 » Fri Nov 08, 2019 6:24 am

I do enjoy the power of spreadsheets. It has been a several years since I tried anything to tap into the power, and much of the learning curve I'd climbed has faded without frequent use.

I see you're enjoying your workhorse as I am. My computer experience began in Chicago with Chicago MUG (TROU) in mid 1980s.

Thank you Dr. Programmer. Always interesting to see that there is more than one successful way to navigate thru the maze. :)

I'll try tomorrow. I am excited to learn. My spreadsheet use is for volunteer work. I enjoy being a blessing where I can, and I appreciate those who do the same.


g'nite Dr. P

:super:
Apache OpenOffice 4.1.7 Mac OS 10.11.6
michaelz7
 
Posts: 3
Joined: Fri Nov 08, 2019 5:14 am


Return to Calc

Who is online

Users browsing this forum: No registered users and 4 guests