Note: The other languages of the website are Google-translated. Back to English
登入  \/ 
x
or
x
註冊  \/ 
x

or

如何計算多個工作表中的特定值?

假設我有多個工作表,其中包含以下數據,現在,我想從這些工作表中獲取特定值“ Excel”的出現次數。 如何在多個工作表中計算特定值?

doc-count-across-multiple-sheets-1 doc-count-across-multiple-sheets-2 doc-count-across-multiple-sheets-3 2 doc-count-across-multiple-sheets-4

用公式計算多個工作表中的特定值

使用Kutools for Excel在多個工作表中計算特定值


  用公式計算多個工作表中的特定值

在Excel中,有一個公式供您計算多個工作表中的某些值。 請執行以下操作:

1。 在單列中列出所有包含要計數的數據的工作表名稱,如以下屏幕截圖所示:

doc-count-across-multiple-sheets-5

2。 在空白單元格中,請輸入以下公式: =SUMPRODUCT(COUNTIF(INDIRECT("'"&C2:C4&"'!A2:A6"),E2)),然後按 Enter 鍵,您將在這些工作表中獲得值“ Excel”的數字,請參見屏幕截圖:

doc-count-across-multiple-sheets-6

筆記:

1.在上式中:

  • A2:A6 是您要在工作表中計算指定值的數據范圍;
  • C2:C4 是工作表名稱列表,其中包含要使用的數據;
  • E2 是您要基於的條件。

2.如果需要列出多個工作表,則可以閱讀本文 如何在Excel中列出工作表名稱? 處理這個任務。

3.在Excel中,您還可以使用COUNTIF函數一個接一個地添加工作表,請使用以下公式: =COUNTIF(Sheet1!A2:A6,D2)+COUNTIF(Sheet10!A2:A6,D2)+COUNTIF(Sheet15!A2:A6,D2)Sheet1, Sheet10Sheet15 是您要計算的工作表, D2 是您基於的條件),然後按 Enter 獲得結果的關鍵。 看截圖:

doc-count-across-multiple-sheets-7


使用Kutools for Excel在多個工作表中計算特定值

如果你有 Kutools for Excel,其 導航 窗格中,您可以快速列出併計算多個工作表中的特定值。

Kutools for Excel : 帶有300多個便捷的Excel加載項,可以在30天內免費試用. 

安裝後 Kutools for Excel,租約請執行以下操作:

1。 點擊 Kutools > 導航,請參見屏幕截圖:

doc-count-across-multiple-sheets-9

doc-count-across-multiple-sheets-10

2。 在 導航 窗格,請執行以下操作:

(1.)點擊 查找和替換 按鈕以展開 查找和替換 窗格

(2.)將特定值鍵入 查找內容 文本框;

(3.)從 惠廷 下拉,在這種情況下,我會選擇 選定的工作表;

(4.)然後從中選擇要計算特定值的紙張 工作簿 列錶框;

(5.)檢查 匹配整個單元格 如果要計算單元格匹配的精確度;

(6.)然後單擊 找到所有 按鈕以列出多個工作表中的所有特定值,並且單元格的數量顯示在窗格的底部。

立即下載和免費試用Excel的Kutools!


演示:使用Kutools for Excel在多個工作表中計算特定值

Kutools for Excel:具有300多個方便的Excel加載項,可以在30天內免費試用,沒有任何限制。 立即下載並免費試用!


相關文章:

如何在Excel中使用countif來計算百分比?

如何在Excel中對多個條件進行計數?


最佳辦公效率工具

Kutools for Excel解決了您的大多數問題,並使您的生產率提高了80%

  • 重用: 快速插入 複雜的公式,圖表 以及您以前使用過的任何東西; 加密單元 帶密碼 創建郵件列表 並發送電子郵件...
  • 超級公式欄 (輕鬆編輯多行文本和公式); 閱讀版式 (輕鬆讀取和編輯大量單元格); 粘貼到過濾範圍...
  • 合併單元格/行/列 不會丟失數據; 拆分單元格內容; 合併重複的行/列...防止細胞重複; 比較範圍...
  • 選擇重複或唯一 行; 選擇空白行 (所有單元格都是空的); 超級查找和模糊查找 在許多工作簿中; 隨機選擇...
  • 確切的副本 多個單元格,無需更改公式參考; 自動創建參考 到多張紙; 插入項目符號,複選框等...
  • 提取文字,添加文本,按位置刪除, 刪除空間; 創建和打印分頁小計; 在單元格內容和註釋之間轉換...
  • 超級濾鏡 (將過濾方案保存並應用於其他工作表); 高級排序 按月/週/日,頻率及更多; 特殊過濾器 用粗體,斜體...
  • 結合工作簿和工作表; 根據關鍵列合併表; 將數據分割成多個工作表; 批量轉換xls,xlsx和PDF...
  • 超過300種強大功能。 支持Office / Excel 2007-2019和365。支持所有語言。 在您的企業或組織中輕鬆部署。 完整功能30天免費試用。 60天退款保證。
kte選項卡201905

Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 每天將您的工作效率提高50%,並減少數百次鼠標單擊!
officetab底部
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    emran · 2 years ago
    1*1=1 but from 2 it should be 3 double. how i set up in excel? please give me a solution.
  • To post as a guest, your comment is unpublished.
    Hari · 2 years ago
    @Mike I want to count specific word in Coloum accross the Jan to Dec, Please advice and sum it up
  • To post as a guest, your comment is unpublished.
    Mike · 3 years ago
    This was extremely helpful. the below formula is what i use to track all my employees Vacation,Sick,Personal,LOA days. I have tabs for every month of the year and use this to track how many days they have used. All i do is change the "V" to a "S" or "P". Formula works perfect! thanks for the info....

    =COUNTIF(January!B16:AF16,"V")+COUNTIF(February!B16:AF16,"V")+COUNTIF(March!B16:AF16,"V")+COUNTIF(April!B16:AF16,"V")+COUNTIF(May!B16:AF16,"V")+COUNTIF(June!B16:AF16,"V")+COUNTIF(July!B16:AF16,"V")+COUNTIF(August!B16:AF16,"V")+COUNTIF(September!B16:AF16,"V")+COUNTIF(October!B16:AF16,"V")+COUNTIF(November!B16:AF16,"V")+COUNTIF(December!B16:AF16,"V")
  • To post as a guest, your comment is unpublished.
    David · 3 years ago
    Hi. Using this formula:
    =SUMPRODUCT(COUNTIF(INDIRECT("'"&C2:C4&"'!A2:A6"),E2))

    I get a Ref error if Column C has more than 9 rows. In other words, INDIRECT("'"&C2:C9&"'!A2:A6"),E2)), is OK but INDIRECT("'"&C2:C10&"'!A2:A6"),E2)) is not.
    How do I avoid this error?
  • To post as a guest, your comment is unpublished.
    matt · 3 years ago
    @juntjoo tried it, didn't work. you need your tab(sheet) names in the cells for it to work. The cells are actually making up a range themselves, hence C2:C4 in the formula
  • To post as a guest, your comment is unpublished.
    matt · 3 years ago
    @foxx try =SUMPRODUCT(COUNTIFS(INDIRECT("'"&C2:C4&"'!A2:A6"),E2),(INDIRECT("'"&C2:C4&"'!A2:A6"),X2),(INDIRECT("'"&C2:C4&"'!A2:A6"),Y2))
    where E2, X2 and Y2 are your criteria and INDIRECT("'"&C2:C4&"'!A2:A6" are your criteria range, where C2:C4 are your tab names and A2:A6 is your data range

    let me know if it works I'm actually very curious, didn't have time to run and test it myself. I just had to use one criteria so above easier formula did work wonders for me
  • To post as a guest, your comment is unpublished.
    foxx · 4 years ago
    How would I write the formula above (=SUMPRODUCT(COUNTIF(INDIRECT("'"&C2:C4&"'!A2:A6"),E2))) if I had to use the COUNTIFS function? Right now I have to see if certain cells have met 2 to 3 criteria (across multiple worksheets).

    cheers for you help.
  • To post as a guest, your comment is unpublished.
    juntjoo · 5 years ago
    Can you not specify your range of cells within a RANGE of sheets instead of "sheet1+sheet2+sheet3...." and specify a range to compare to like: countif(sheet1:sheet5!b:b, a:a)
  • To post as a guest, your comment is unpublished.
    fasdfasf · 5 years ago
    sdfasdfas fasdfasf

    dfadf

    asdfsdf

    asdfasf
    asdfasf


    sdfas