Sumif a cell contains
问题 My problem is the sumif part, it could not search all cells which contains the string 'model' and add up the value pertaining to 'model'. Please help to check if there is any error when I am using the sumif function. Sub Test() Dim file As String Dim file1 As String Dim wb As Workbook Dim wb1 As Workbook Dim ws As Worksheet Dim ws1 As Worksheet Dim ws2 As Worksheet Dim i As Variant Dim y As Variant Dim LastRow As Long Dim LastRow2 As Long Dim Model As String Dim NextMonth As String Dim SumUp