How can i add cells if condition is met

0 votes
What should I do if the condition is true? I'm using a condition that says to display cell value C if it is larger than 5 and equal to 10, to add cell values C and D if it is greater than 10 and equal to 15, and to add cell values C, D, and E if it is greater than 15. I still have a question. I need to figure out the amount depending on the days using the table below. [1]: https://i.stack.imgur.com/ZTWcQ.png cell Cell A displays 10000 for days 8 through 14, B+C for days 15 through 21, and D+C+B for days 21 and beyond. Every week that passes beyond 35 days should add extra values to cell D. For instance, the computation for 35 days should be B+C+D+D, and so forth.
Nov 24, 2022 in Others by Kithuzzz
• 38,010 points
575 views

1 answer to this question.

0 votes

Both the AND function and nested if statements can be used to accomplish this.

To compare the values, you will use the and(statement1,statement2) operator, for instance: value>5,value<10

If the condition is false, add another if statement to check for more results. Use this in the if(condition,ifTrueValue,ifFalseValue).

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)))

enter image description here

answered Nov 24, 2022 by narikkadan
• 63,700 points

Related Questions In Others

0 votes
1 answer

How can I verify if a column is only decimal using Power Query M formula?

Try this: = Table.ReplaceValue(#"Changed Type",each [Column4], each ...READ MORE

answered Feb 13, 2023 in Others by narikkadan
• 63,700 points
665 views
0 votes
1 answer

How can I use a command button in excel to set the value of multiple cells in one click?

Try this: Private Scan As Integer Private Sub CommandButton1_Click() ...READ MORE

answered Oct 24, 2022 in Others by narikkadan
• 63,700 points
611 views
0 votes
1 answer

Excel - return a value only if a condition is met via VBA

You could use IIf() DestSheet.Cells(erow, 9).Value = IIf(newuplift = ...READ MORE

answered Jan 26, 2023 in Others by narikkadan
• 63,700 points
548 views
0 votes
1 answer

Excel - How do I round a date type to the next hour if it is more than one minute

Add almost 30 minutes and it'll get ...READ MORE

answered Mar 27, 2023 in Others by narikkadan
• 63,700 points
254 views
0 votes
1 answer

Calculate Birthdate from an age using y,m,d in Excel

Hello, yes u can find your birthdate using ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,670 points
2,140 views
0 votes
1 answer

Calculate Birthdate from an age using y,m,d in Excel

Hi To Calculate the date, we can ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,670 points
1,639 views
0 votes
0 answers

Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

Feb 17, 2022 in Others by Edureka
• 13,670 points
797 views
0 votes
1 answer

IF - ELSE IF - ELSE Structure in Excel

In this case, you can use nested ...READ MORE

answered Feb 18, 2022 in Others by gaurav
• 23,260 points
2,836 views
0 votes
1 answer

How can I add a wildcard to my if formula (that also contains an or condition)

3 Try: The formula in B1: =IF(SUM(COUNTIF(A1,{"* IDE","* IDE-?"})),"Y","N") Or, a little ...READ MORE

answered Feb 2, 2023 in Others by narikkadan
• 63,700 points
390 views
0 votes
1 answer

Excel - How can I get the average of cells where the value in one column is X and the value in another column is Y?

Use AVERAGEIFS ... =AVERAGEIFS(C2:C13,A2:A13,"Yellow Typ ...READ MORE

answered Nov 11, 2022 in Others by narikkadan
• 63,700 points
1,146 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP