I am trying to write a formula depending on the count of roll-up summary fields to indicate which color needs to show on the Account object. Here is what I have so far:
IF( OR(Marketing_Sum_Gray__c > 0, Outsourcing_Sum_Gray__c > 0), IMAGE("/servlet/servlet.FileDownload?file=0153C0000004m95", "Gray"),
IF(AND(OR(Marketing_Sum_Black__c > 0, Outsourcing_Sum_Black__c > 0), OR(Marketing_Sum_Gray__c = 0, Outsourcing_Sum_Gray__c = 0), IMAGE("/servlet/servlet.FileDownload?file=0153C0000004m90", "Black"),
IF(AND(OR(Marketing_Sum_Blue__c > 0, Outsourcing_Sum_Blue__c > 0), OR(Marketing_Sum_Black__c = 0, Outsourcing_Sum_Black__c = 0), IMAGE("/servlet/servlet.FileDownload?file=0153C0000004m9P", "Blue"),
IF(AND(OR(Marketing_Sum_Red__c > 0, Outsourcing_Sum_Red__c > 0), OR(Marketing_Sum_Blue__c = 0, Outsourcing_Sum_Blue__c = 0), IMAGE("/servlet/servlet.FileDownload?file=0153C0000004m9A", "Red"),
IF(AND(OR(Marketing_Sum_Yellow__c > 0, Outsourcing_Sum_Yellow__c > 0), OR(Marketing_Sum_Red__c = 0, Outsourcing_Sum_Red__c = 0), IMAGE("/servlet/servlet.FileDownload?file=0153C0000004m9o", "Yellow"),
IF(AND(OR(Marketing_Sum_Green__c > 0, Outsourcing_Sum_Green__c > 0), OR(Marketing_Sum_Yellow__c = 0, Outsourcing_Sum_Yellow__c = 0), IMAGE("/servlet/servlet.FileDownload?file=0153C0000004m9o", "Green"),
IF(AND(OR(Marketing_Sum_Gold__c > 0, Outsourcing_Sum_Gold__c > 0), OR(Marketing_Sum_Green__c = 0, Outsourcing_Sum_Green__c = 0), IMAGE("/servlet/servlet.FileDownload?file=0153C0000004m9o", "Gold"),
IMAGE("/s.gif", "N/A")))))))