Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA + add multiple cells in code.
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.. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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.. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
finding multiple code dates for multiple item number | Excel Worksheet Functions | |||
Delete Blank Rows Code - Multiple Worksheets - Multiple Documents | Excel Discussion (Misc queries) | |||
macro copy/paste data from multiple cells to multiple cells | Excel Discussion (Misc queries) | |||
VBA + add multiple cells in code. | Excel Programming | |||
Can you "duplicate" "copy" listboxes and code to multiple cells? | Excel Programming |