[SOLVED] Nested IF functions

Discuss the spreadsheet application

[SOLVED] Nested IF functions

Postby EdTeach1680 » Tue Mar 31, 2020 4:41 am

Forgive me if this has been covered. I have been googling this problem for a couple hours to no avail and have read a couple threads in this forum that were similar to what I want to achieve but can't seem to get past the second iteration.

I am creating a spreadsheet to track Cost/Benefit for growing chickens and would like to have this sheet grow with my production. The goal of this cell is to self adjust bulk pricing of product through pricing tiers.

Basically, if "I9"<50 "this cell", if "I9">49 "this cell" etc... I have something that works for the first 2 tiers but it displays $0.00 past that. What am I doing wrong?
The I9 cell is dynamic depending on its own calculation if that is going to mess things up.... I am teaching myself how to do spreadsheets so my knowledge is rudimentary at best.

TIA!

=IF(I9<50;D20;IF(I9>49;G20;IF(I9>74;K20;IF(I9>99;O20;IF(I9>199;S20)))))
Last edited by robleyd on Tue Mar 31, 2020 8:39 am, edited 2 times in total.
Reason: Add green tick
OpenOffice4.1.5 on Win 10
EdTeach1680
 
Posts: 2
Joined: Tue Mar 31, 2020 4:25 am

Re: Nested IF functions

Postby FJCC » Tue Mar 31, 2020 6:55 am

You should not use nested IF functions to do this. A VLOOKUP function is much simpler and easy to adjust. In the attached file, changing the value in A1 will cause the VLOOKUP in B1 to return different values from the table defined in the range C1:D5. Try playing with the value in A1 and see if it makes sense.
Attachments
VLOOKUP.ods
(8.37 KiB) Downloaded 18 times
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7680
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Nested IF functions

Postby EdTeach1680 » Tue Mar 31, 2020 7:17 am

Worked like a charm! TYVM!
OpenOffice4.1.5 on Win 10
EdTeach1680
 
Posts: 2
Joined: Tue Mar 31, 2020 4:25 am


Return to Calc

Who is online

Users browsing this forum: No registered users and 15 guests