Solved

Excel Spreadsheet Help needed.  Nested IF STATEMENT problems.

Posted on 2016-08-24
6
57 Views
Last Modified: 2016-08-25
Spreadsheet is attached with needed raw data already shown.  Notes concerning formulas are in a text box on the spreadsheet.

Would like to accomplish the needed tasks with IF STATEMENT, if possible.
C--Users-dan-Desktop-Payout_to_Pool.xlsx
0
Comment
Question by:baleman2
6 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 41769738
E2 =VLOOKUP(C2-A2,{0,0.01,"0-14 days = 1%";14,0.005,"15-29 days = 1/2 of 1%";29,-0.5,"50% of GS & Commission Deduct";59,-1,"100% of GS & Commission Deduct"},2)

G2 =VLOOKUP(C2-A2,{0,0.01,"0-14 days = 1%";14,0.005,"15-29 days = 1/2 of 1%";29,-0.5,"50% of GS & Commission Deduct";59,-1,"100% of GS & Commission Deduct"},2)

Q2 =MAX(0,E2*M2)

S2 =MIN(0,I2*E2)
0
 
LVL 19

Expert Comment

by:helpfinder
ID: 41769742
hallo,
please check attached excel if it fits your requirements
Copy-of-C--Users-dan-Desktop-Payout.xlsx
0
 

Author Comment

by:baleman2
ID: 41770064
To Helpfinder:

Everything seems to work perfectly except the formula in Column S.  

In the event that our General Manager or CFO reviews the dates and decides to manually change a date (which does happen occasionally), the Column S formula does not populate with data.

For instance, change the C2 date to 07/13/2016.  This puts the date range in the "over 60 days" category.  

E2 and G2 changed correctly and display the correct output.  I would have expected Q2's data to disappear - and it did.  However, S2 should have displayed the 17,220, but did not.
-----------------------------------------------------------------------
Change the date in C5 to 05/02/2016.  This puts the date range in the "less than 15 days" category.

E2 and G2 change correctly and display the correct output.  Q2 displays correct output and S2 is no longer populated with data - which would be correct.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 19

Accepted Solution

by:
helpfinder earned 500 total points
ID: 41770228
OK, I did not see your last d) point because it was hidden in the text box. I updated the formula in S column. Please test it and let me know
Copy-of-C--Users-dan-Desktop-Payout.xlsx
0
 

Author Closing Comment

by:baleman2
ID: 41770282
Perfect !!

Just what I needed !!
0
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 41770956
baleman2,

Even though you've selected a solution, I'm submitting an alternate example workbook that greatly simplifies all your data requirements AND gives you more flexibility in updating the rules in the future should you need.

First, it uses a master data table (tblData) that categorizes your Comm Multiple and Phrasing by aging amounts.  This is on a second sheet (which can be hidden, if desired).

That table is referenced by two VLOOKUP functions on your main sheet, both returning the same results you requested but in much simpler form:
E2: =VLOOKUP(C2-A2,tblData,2,TRUE)
G2: =VLOOKUP(C2-A2,tblData,3,TRUE)

They are basically looking for the closest matching category in the "Aging" column to the difference between the "Paperwork Delivered" and "Date Sold" dates.  

I won't go into a lesson on VLOOKUP, but it's worth learning.  Here is a very good online article from Microsoft that will help:  VLOOKUP function

Second, since your Comm Multiple is actually a component of the "to Pool" and "to Qtr. Payout" values, why not actually use them in the formulas?

Q2: =IF(C2-A2<30,M2*E2,"")
S2: =IF(C2-A2>=30,I2*E2,"")

You can see how much simpler this method is compared to checking the phrasing value.  All these elements are related, and since you have the multiples in the data, it's better to go ahead and use them rather than manually restate them in another formula.

I've attached an example workbook with all this.  

Regards,
=Glenn
EE-Users-dan-Desktop-Payout_to_Pool.xlsx
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS Excel Multi Sheet Formula 13 37
Excel Macro 9 22
Index Match does not work why ?? 4 19
Create Dynamic Range Via VBA 9 18
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question