0
我有一組數據,我想對它進行過濾,因此如果每第4行包含某個單詞,則上述4行都將變爲零,否則它保持不變,例如:如何使Excel單元格計數器增加X數量Y數量行數
1 A <--- turned into zero because the 4th row is x
2 A <--- turned into zero because the 4th row is x
3 A <--- turned into zero because the 4th row is x
4 X <--- turned into zero because the 4th row is x
5 A <--- stays the same because the 4th row is A
6 A <--- stays the same because the 4th row is A
7 A <--- stays the same because the 4th row is A
8 A <--- stays the same because the 4th row is A
我使用下面的代碼,但有一個困難時期由4每4個行使得A4在代碼增加。
=IF(ISNUMBER(SEARCH("X",A4)),0,A1)
公式應該是上面的例子如下:
1 =IF(ISNUMBER(SEARCH("X",A4)),0,A1)
2 =IF(ISNUMBER(SEARCH("X",A4)),0,A2)
3 =IF(ISNUMBER(SEARCH("X",A4)),0,A3)
4 =IF(ISNUMBER(SEARCH("X",A4)),0,A4)
5 =IF(ISNUMBER(SEARCH("X",A8)),0,A5)
6 =IF(ISNUMBER(SEARCH("X",A8)),0,A6)
7 =IF(ISNUMBER(SEARCH("X",A8)),0,A7)
8 =IF(ISNUMBER(SEARCH("X",A8)),0,A8)