我有一個 google 表格檔案,其中包含很多表格,其中大多數都有從其他表格中提取的資料。
假設我有一張名為的表格Team 1,其中包含玩家 1、玩家 2、玩家 3 等的資料。
現在我想將每個玩家的資料拉到不同的表格中,也就是將他的資料從Team 1表格中拉到一個名為的新表格中Player 1
我=FILTER正常使用→=FILTER('Team 1'!A:CC, 'Team 1'!B:B="Player 1")
這很好用..但是我有一個巧妙的想法來避免#N/A在播放器沒有任何資料的情況下出現錯誤,所以我想出了這個:
=IF(
EXACT(
'Team 1'!B:B, "Player 1"),
FILTER(
'Team 1'!A:CC, 'Team 1'!B:B="Player 1"),
"This Player has no data")
哪個效果很好......有時......
我不明白為什么這個IF陳述是不一致的。
假設Player 1有資料Team 1,我想把它拉到作業Player 1表中。
如果我把公式放在第 2 行,它會回傳 False:

But if I put the formula in Row 3 it returns True:

Also another weird thing, it used to work well if I put the formula in row 2 in one of the sheets but not the others.
I do not understand why any of this happened as it makes no sense.. to me at least.
Edit1:
I didn't enclude the Team 1 sheet which was important as my problem wasn't with the IF per se, but my problem was with EXACT.
Apparently EXACT depends on the campared data to be on the same row/cell
If we put the same formula in A1 to A4 in Player 1 Sheet:

uj5u.com熱心網友回復:
為避免在空輸出的情況下出現 N/A 錯誤,請將 FILTER() 包裝在 IFERROR() 或 IFNA() 中
=IFERROR(FILTER('Team 1'!A:CC, 'Team 1'!B:B="Player 1"), "This Player has no data")
看看這是否有效?
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/443766.html
標籤:google-sheets google-sheets-formula
