精品丰满熟女一区二区三区_五月天亚洲欧美综合网_亚洲青青青在线观看_国产一区二区精选

  • <menu id="29e66"></menu>

    <bdo id="29e66"><mark id="29e66"><legend id="29e66"></legend></mark></bdo>

  • <pre id="29e66"><tt id="29e66"><rt id="29e66"></rt></tt></pre>

      <label id="29e66"></label><address id="29e66"><mark id="29e66"><strike id="29e66"></strike></mark></address>
      學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 工具軟件 > 辦公軟件學(xué)習(xí) > Excel教程 > Excel函數(shù) > excel按照顏色條件匯總函數(shù)的方法

      excel按照顏色條件匯總函數(shù)的方法

      時(shí)間: 業(yè)華773 分享

      excel按照顏色條件匯總函數(shù)的方法

        Excel中經(jīng)常需要使用到函數(shù)按照顏色條件進(jìn)行匯總,函數(shù)具體該如何按照顏色條件進(jìn)行匯總呢?下面是學(xué)習(xí)啦小編帶來的關(guān)于excel 按照顏色條件匯總函數(shù)的方法,希望閱讀過后對(duì)你有所啟發(fā)!

        excel 按照顏色條件匯總函數(shù)的方法:

        顏色匯總函數(shù)使用步驟1:在EXCEL界面中,按下組合鍵 Alt + F11,彈出一個(gè)MicrosoftVisual Basic窗口。

        顏色匯總函數(shù)使用步驟2:在窗口中,執(zhí)行菜單操作:“插入”—>“模塊”,如下圖。

        顏色匯總函數(shù)使用步驟3:看到一個(gè)“(通用)”的窗體,這個(gè)窗體就是用來輸入VBA代碼的窗體,如下圖:

        顏色匯總函數(shù)使用步驟4:將如下代碼粘貼到該窗體中:

        FunctionSumByColor(Ref_color As Range, Sum_range As Range)

        Application.Volatile

        Dim iCol As Long

        Dim rCell As Range

        SumByColor = 0

        iCol =Ref_color.Interior.ColorIndex

        For Each rCell InSum_range

        If iCol = rCell.Interior.ColorIndex And WorksheetFunction.IsNumber(rCell) Then

        SumByColor = SumByColor + rCell.Value

        End If

        Next rCell

        End Function

        結(jié)果如下圖:

        顏色匯總函數(shù)使用步驟5:關(guān)閉Microsoft VisualBasic窗口,返回到EXCEL窗口,函數(shù)SumByColor設(shè)置完畢。

        顏色匯總函數(shù)使用步驟6:設(shè)置完成的函數(shù)SumByColor(Ref_color, Sum_range),函數(shù)有2個(gè)參數(shù):

        顏色匯總函數(shù)使用步驟7:第一個(gè)是要想統(tǒng)計(jì)顏色的單元格(任意一個(gè)與要匯總顏色相同的單元格均可),

        顏色匯總函數(shù)使用步驟8:第二個(gè)是要匯總的單元格區(qū)域。

        顏色匯總函數(shù)使用步驟9:如本例,在B16格中輸入: =SumByColor(B15,B2:F13) 得出結(jié)果:1690748

      771067