Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Sum Non-Contiguous Columns
I'm looking for VBA code to sum columns P and R in column S (sheet 1).
So, cell P2 and R2 will be summed in S2; P3 and R3 summed in S3, and so on. Thanks! Exceller |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Sum Non-Contiguous Columns
Set frng = Range("s2:s" & Cells(Rows.count, "s").End(xlUp).Row)
With frng .Formula = "=p2+r2" 'uncomment next line to eliminate the formula ' .Formula = .Value End With -- Don Guillett SalesAid Software "Exceller" wrote in message ... I'm looking for VBA code to sum columns P and R in column S (sheet 1). So, cell P2 and R2 will be summed in S2; P3 and R3 summed in S3, and so on. Thanks! Exceller |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Sum Non-Contiguous Columns
Thanks, Don. I appreciate your help.
Exceller "Don Guillett" wrote: Set frng = Range("s2:s" & Cells(Rows.count, "s").End(xlUp).Row) With frng .Formula = "=p2+r2" 'uncomment next line to eliminate the formula ' .Formula = .Value End With -- Don Guillett SalesAid Software "Exceller" wrote in message ... I'm looking for VBA code to sum columns P and R in column S (sheet 1). So, cell P2 and R2 will be summed in S2; P3 and R3 summed in S3, and so on. Thanks! Exceller |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Charting with non contiguous columns | Charts and Charting in Excel | |||
Copying non-contiguous columns to contiguous columns | Excel Programming | |||
DCOUNT for non-contiguous columns | Excel Worksheet Functions | |||
Hide non-contiguous columns | Excel Programming | |||
How to Remove Non-Contiguous Columns from Worksheet | Excel Programming |