# Doubt in nested if

#### karti1986

##### Board Regular
Hi All

Im trying to make a big fuss of nothing.. hitting my head instead of thinking calm. Appreciate any help on my issue.
I'm trying to rate a set of servers with respect to the no. of alerts which they throw.
Rating being 1-Red, 2-Amber, 3-Green...

Overall average here being = 7, server 1 to server 23 are 1-Red
Take an average from Server 24 to Server 41, which is 5 here.( point where the no. of alerts gets lesser than the overall average(7))
and rate the servers which are in between overall average(7) and the new average(5) as 2 -Amber
Servers below new average(5) are 3-Green

 Server 1 13 Server 2 12 Server 3 10 Server 4 10 Server 5 10 Server 6 10 Server 7 9 Server 8 9 Server 9 9 Server 10 9 Server 11 9 Server 12 9 Server 13 9 Server 14 9 Server 15 8 Server 16 8 Server 17 8 Server 18 8 Server 19 7 Server 20 7 Server 21 7 Server 22 7 Server 23 7 Server 24 6 Server 25 6 Server 26 6 Server 27 6 Server 28 6 Server 29 6 Server 30 5 Server 31 5 Server 32 5 Server 33 5 Server 34 5 Server 35 5 Server 36 5 Server 37 5 Server 38 5 Server 39 5 Server 40 5 Server 41 5

<colgroup><col><col></colgroup><tbody>
</tbody>

### Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Something like this? Not sure what new average means??

=IF(B1>ROUNDDOWN(AVERAGE(B:B),0),"RED",IF(B1=ROUNDDOWN(AVERAGE(B:B),0),"AMBER","GREEN"))

It didnt work buddy..
my sequence of actions to be
1. take overall average of no. of events Server1 to Server41 (Average=7)
2. compare no. of events with overall average(7), events greater than 7 are RED
3. a breaking point where the condition fails.. here server 24 is the breaking point where the condition fails
4. average of no. of events from the breaking point to end (here Server24 to Server41) which is 5
5. another condition - no. of events which lies between Overall Average(7) and the new average(5) to be AMBER
6. rest of the servers with events less than new average(5) to be GREEN.
a macro to attain this will helpful too..

Replies
1
Views
76
Replies
15
Views
806
Replies
1
Views
322
Replies
11
Views
2K
Replies
6
Views
355

1,203,046
Messages
6,053,190
Members
444,644
Latest member
keepontruckinc4

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

### Which adblocker are you using?

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

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