View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default VBA + add multiple cells in code.

Check to see what the value of Row is and the values of

Worksheets("Int Project").Cells(Row, 186)
Round(Worksheets("Int Project").Cells(Row, 184), 0)

along with
Worksheets("Int Project").Cells(Row, 72).Value
Worksheets("Int Project").Cells(Row, 78).Value

All of these must evaluate to a number to be valid...

HTH

"Adam" wrote:

No I changed it to see if that was it, but it was not.
(Worksheets("Int Project").Cells(Row, 72).Value + Worksheets("Int
Project").Cells(Row, 78).Value)

is what I am trying to add, and they are both numbesr.

"Jim Thomlinson" wrote:

Stab in the dark here but as a guess one of the cell addresses you are
referencing is not a number, but rather is text of some sort. Excel does not
understand what you want to do when you try to add a number to a text string
and you get a type mismatch error...

HTH

"Adam" wrote:

I keep getting a data type mismatch. What am i doing wrong on the addition??

If Worksheets("Int Project").Cells(Row, 186) 0 Then Worksheets("Int
Quote").Cells(Row, 109) = "Doors & Frames - " & "Apply " &
Round(Worksheets("Int Project").Cells(Row, 184), 0) & " Coats " & "- Time: ("
& (Worksheets("Int Project").Cells(Row, 72).Value + Worksheets("Int
Project").Cells(Row, 78).Value) & " hours)" & " " &
Worksheets("Int Project").Cells(Row, 186) & " Gallons of ____________"
'Average Doors and Frames

Thanks..