'How can i add cells if condition is met
How can I add cells if condition is met. I'm using condition if cell value is greater than 5 and equal to 10 then show value of Cell C, and if value is greater than 10 and equal to 15 then add values of cell C and D, and if value is greater than 15 then add values of cell C,D and E.?
I need to ask one more thing. Here is the table and i need to calculate the amount based upon the days. [1]: https://i.stack.imgur.com/ZTWcQ.png cell For days 8 to 14 cell A shows 10000, for days 15 to 21 cell A shows B+C and after 21 days cell A shows B+C+D. After 35 days with every passing week it should add cell D values additionally. for example after 35 days calculation should be B+C+D+D and so on.
Solution 1:[1]
This can be achieved by using nested if statements and also using AND function
you will use the and(statement1,statement2) to compare the values for example: value>5,value<10
use this in the if(condition,ifTrueValue,ifFalseValue) again if the condition is false, you can add another if statement to check for more results
You can use the following function in the cell you want the result in
=IF(AND(B9>5,B9<=10),C9,IF(AND(B9>10,B9<=15),C9+D9,IF(B9>15,C9+D9+E9,0)))

below is the screen shot of the result that i have tested Hope this helps
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Muhammad Talha |
