View Single Post
  #2   Report Post  
Trevor Shuttleworth
 
Posts: n/a
Default

One way:

Sub test()
With Selection
Range("dx" & .Row) = WorksheetFunction.Sum _
(Range("dz" & .Row & ":ep" & .Row))
End With
End Sub

Regards

Trevor


wrote in message
ups.com...
I've got some code going, and need to perform a function if the sum of
cells between columns DZ and EP on every row exceeds zero. What is the
code to sum a range?

Range("dz" & selection.row).value + Range("ea" & selection.row).value +
etc is too cumbersome. What's the better way?

Thanks!