Hello, everyone
I have three columns, F, AC and E. On column F I have the name of a Risk and on AC I have the department which have identified such risk. I'm trying to give a serial code to risks on colum E. Things to consider:
- Each department can identify the same risk more than once. In such case, the serial code should be the same
- Each time the department changes I would like the serial code to reset the counting (regardless of the name of the risk)
This is what I have so far:
I think I was able to address the first point. However, I can't figure out how to manage the second one.
Could you help me out?
Thanks!
I have three columns, F, AC and E. On column F I have the name of a Risk and on AC I have the department which have identified such risk. I'm trying to give a serial code to risks on colum E. Things to consider:
- Each department can identify the same risk more than once. In such case, the serial code should be the same
- Each time the department changes I would like the serial code to reset the counting (regardless of the name of the risk)
This is what I have so far:
Code:
=IF(COUNTIFS(F$2:F2;F2;AC$2:AC2;AC2)=1;MAX(E$1:E1)+1;INDEX($E$2:E2;MATCH(F2;$F$2:F2;0)))
I think I was able to address the first point. However, I can't figure out how to manage the second one.
Could you help me out?
Thanks!