View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone[_2_] Jim Cone[_2_] is offline
external usenet poster
 
Posts: 1,549
Default Type Mismatch when trying to sum columns


If .Cells(lRow, "B").Value < "Year To Date" Then
Cells(lRow, "R").Value = WorksheetFunction.Sum(Cells(lRow, "D").Value, _
Cells(lRow, "F").Value, Cells(lRow, "I").Value, Cells(lRow, "L").Value)
End If
--
Jim Cone
Portland, Oregon USA


"jeremiah"
wrote in message
I am trying to sum the value in 4 numbers across the same row if the value of
another cell in that row is a specific string. I need to be able to loop
through the sheet because there are multiple rows that I will need to search
for my criteria. Using the below sub I get a typemismatch error - I assume
it is because some of my cell values may be blank - is there a way to
correct this
-snip-