Nested Ifs referencing different cells

beardedcraig

New Member
Joined
Aug 2, 2018
Messages
3
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]Allocated Budget[/TD]
[TD="align: center"] Spend[/TD]
[TD="align: center"]Forecast Spend[/TD]
[TD="align: center"]Total Spend (inc. Forecast)[/TD]
[TD="align: center"]Max Budget (Overspend)[/TD]
[TD="align: center"]Budget RAG[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]£100[/TD]
[TD="align: center"]£50[/TD]
[TD="align: center"]£25[/TD]
[TD="align: center"]£75[/TD]
[TD="align: center"]£110[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



Can anyone help correct my formula please? I basically want to work out a single formula to use in F2 for the following rules:

IF D2<=A2 then display "G", IF D2>A2 and D2<e2 then="" display="" "a"="" or="" if="" d2="">E2 then display "R" ELSE display " "


The closest I have gotten is:

=IF((D2<=A2, "G", IF(AND(D2>A2, D2<e2), "a",="" if(d2="">E2, "R"), ""))</e2),></e2>
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
you are missing an operation.

What goes in the middle of D2 and E2

IF D2<=A2 then display "G", IF D2>A2 and D2_?_E2
 
Upvote 0
What do you mean by the D2E2 part, not sure what that means? Are you saying for the 2nd IF that you want to check if D2 is greater than A2 and D2 is also ?? to E2?
 
Upvote 0
Use this formula..... just replace the = sign in between D2 and E2 to whatever your operation is

=IF(D2<=A2,"G",IF(AND(D2>A2,D2=E2),"R"," "))
 
Upvote 0
What do you mean by
D2
<e2 style="background-color: transparent; color: rgb(51, 51, 51); font-family: Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;" d2="" if="" or="" "a"="" display="" then="">E2?</e2>
 
Upvote 0

Forum statistics

Threads
1,224,815
Messages
6,181,135
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top