Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Excel calculations help?
Alright lets see what you guys can come up with.
I've got 4 columns. First is GCI (Gross amount made from transaction in this case). Second is a percentage based deduction by the company we work for so they can pay their salaried employees (30%) and is displayed as a countdown from it's cap of $15,000. Third is a deduction for using the company's trademark, name, ect (6%) and is displayed as a countdown from it's cap of $3,000. Which brings me to the 4th column and my problem. The fourth column is calculating the running total for the Net income (gross minus deductions). Presently I have it setup with this formula. =IF(G6>=0,IF(H6>=0,F6+I5,F6-(F6*0.06)+I5),IF(H6>=0,F6-(F6*0.3)+I5,I5+F6-(F6*0.3)-(F6*0.06))) In English this means check column 2 and see if it's reached a positive number yet (meaning the cap was reached) if so then check column 3 and see if it's cap has been reached, if so then take column 1 plus the calculated net from the row above and add them together, if not then take column 1 minus the deduction for column 3 only and add it to the net from the row above, Otherwise if column 2 is not above 0 check column 3 and is if it's above 0, if it is then take column 1 minus the deduction from column 2 and add it to the net from the row above, otherwise (both being below 0) take column 1 and add it to the net above subtracting the percentages for column 2 and 3.
That mess of logic does 95% of what I need it to do. The problem comes in where income in column 1 not only makes column 2 and 3 reach 0 but makes them go positive. In otherwords part of the income has a deduction but the other part doesn't. I need a change to the logic check so that if it is above 0 it can calculate how much of the income in column 1 was and wasn't needed to be deducted so that the net income reflects correctly. Otherwise the net will reflect too much/too little.
Side notes. Column 1 is not a running total and only reflects gross income from the transaction. Column 2 and 3 are count downs (or count ups since it's going from a negative number toward 0), Column 4 is a running total of net income. The displays on these columns cannot be changed in purpose. Otherwise that mess of code would be a lot more compact. Anyways any ideas?
Stupid yahoo answers shortened the formula I have. anyways here it is again. Hopefully it doesn't shorten it this time.
=IF(G3 =0,IF(H3 =0,F3 I2,F3-(F3*0.06) I2),IF(H3 =0,F3-(F3*0.3) I2,I2 F3-(F3*0.3)-(F3*0.06)))
Greg thanks for your input but that wasn't even close to what I needed help on. The formula I have does what I want it to do. It needs to check for greater than or equal to for both the 2nd and 3rd. What it needs to do in addition to that is if the second and or third columns are at or above 0 it needs to calculate how much if any of the amount in column 1 is deduction free.
First I don't think you fully understand nested if then statements and second it didn't paste my formula correctly because in excel it does have the = so it didn't import that via copy paste and seems to have cut out plus signs too. Here's my formula for sure this time and I'll Explain the above formula in pieces. =IF(G3 =0,IF(H3 =0,F3 I2,F3-(F3*0.06) I2),IF(H3 =0,F3-(F3*0.3) I2,I2 F3-(F3*0.3)-(F3*0.06))).
Explanation "=IF(G3 =0," checks G3 for greater than or equal to 0.
If that is true then it runs "IF(H3 =0,"
If that is true then it runs "F3 I2" I should mention column 4 is "I".
If H3 is not = 0 but G3 is then it runs "F3-(F3*.06) I2)" since at this point the 30% or $15,000 is paid off but the 6% or $3000 isn't.
IF however G3 at the beginning isn't greater than or equal to 0 it goes all the way down to the second "IF(H3 =0,"
Assuming that statement is true it runs "F3-(F3*0.3) I2&q
ok for some reason on the question side yahoo answers likes deleting the greater than sign and plus signs. I'm going to repost this question with a link to a site that explains it. Sorry for the issues and since Greg was the only one that answered.. Congrats you're best answer for this one.
2 Answers
- Greg GLv 78 years agoFavorite Answer
First, change the first part to: =IF(G3>=0, IF(H3>=0, or maybe even =IF(AND(G3>=0, H3>=0),
This will now test if the value goes greater than 0 instead of just equaling 0.
I'm a bit confused by the rest of the information though. Feel free to contact me if necessary.
Also, FYI, adding spaces to formulas (after comma's is the best place) prevents YA from truncating it.
EDIT: Ok.. well, since that does test for greater than or equal to 0, not sure how it isn't close. Looking closer at your formula, you have 2 tests for H3 = 0:
=IF(G3 =0, IF(H3 =0,F3 I2, F3-(F3*0.06) I2), IF(H3 =0
...................^^^^^^^^^^^.......................................^^^^^^^^^^^
The formula will never act on the 2nd test because if it's 0, it's always TRUE for the first test. Perhaps changing the first part to just a test for greater than will do.
=IF(G3>0, IF(H3>0, F3 I2, F3-(F3*0.06) I2), IF(H3=0
(note, the blanks before the I2's are plus signs that YA inexplicably deletes.)
If we're still not there yet, I may need to see some sample data and an example of what the expected result is so I can get to the correct formula.
- Nuff SedLv 78 years ago
Greg was the only one who answered in the FIRST DAY. Others might still chime in, if your problem is ever actually adequately explained.