简体   繁体   中英

Avoid Circular Reference

I am trying to program a counter in column E where if in cell F2=F1, increase the counter, otherwise reset the counter to 1, but I keep getting a circular reference error for that cell. This formula is placed in cell E2. The first value should be in cell E2 should be 1 because the value in cell F2 does equal the value in cell F1. How do I make this work without getting circular reference errors?

循环参考

If your job list is sorted this formula works:

=COUNTIF($A$1:A1,A1)

The important part is to fix the first part of the range to be filtered and the second part to be relative to the current position.

By that only the previous and current rows are filtered. 在此处输入图像描述

If the list isn't sorted, the formula still works - but in case 14625 occurs at the end of the list ist will count as 4.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM