Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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! |
#2
![]() |
|||
|
|||
![]()
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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using other workbooks.. | Excel Worksheet Functions | |||
School-boy secret code help needed | Excel Discussion (Misc queries) | |||
Make Change Case in Excel a format rather than formula | Excel Worksheet Functions | |||
formula / code help needed | Excel Discussion (Misc queries) | |||
syntax question - cell references in VB code | New Users to Excel |