# Nested Ifs referencing different cells

#### beardedcraig

##### New Member
 A B C D E F 1 Allocated Budget Spend Forecast Spend Total Spend (inc. Forecast) Max Budget (Overspend) Budget RAG 2 £100 £50 £25 £75 £110

<tbody>
</tbody>

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

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

#### Nine Zero

##### Well-known Member
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

#### philwojo

##### Well-known Member
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?

#### Nine Zero

##### Well-known Member
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"," "))

##### MrExcel MVP
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>

Replies
2
Views
124
Replies
0
Views
84
Replies
3
Views
183
Replies
10
Views
254
Replies
6
Views
895

1,171,655
Messages
5,876,721
Members
433,207
Latest member
Bitt0101

### 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?

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