Excel_User_10k
Board Regular
- Joined
- Jun 25, 2022
- Messages
- 100
- Office Version
- 2021
- Platform
- Windows
In the area highlighted in the Screenshot, there are two grey Cells. The top one if a fraction that I want to show how many Greens there are out of all Greens, Ambers, Reds and Blues added together. So if there were 2 Greens, 1 Yellow, 1 Red, 1 Blue, it would say "2/5". I have the formula showing in the other Screenshot, highlighting the part concerning to the month that is selected (as the rest of the formula is only relevant when any of the other months is selected in the drop down box). It basically says Divide [Green] by how many there are when adding [Green], [Yellow], [Red], and [Blue]. However sometimes, especially if there are 0 Greens, it does not seem to understand. Whereas I would expect it to say "0/5" for instance, it will say something random like "0/3" even though there are still a total of 5. I suspect this is because it would be dividing the total by 0, which obviously is not mathematically sound. However, I do not know how else to write the formula to tell it this. Any ideas?