Looping through columns

T

teresa

Hi, would like to do the following operation with columns C:H
and then columns K:M,

Im missing a couple of lines in my code below which will loop through
necessary cols, any help is much appreciated

sub()

Dim intNumRows As Integer, c As Variant, lngCellTotal As Long
Dim x As Integer

intNumRows = Cells(50, "c").End(xlUp).Row
With Range("c" & intNumRows + 1)
.Borders(xlEdgeTop).Weight = xlMedium

End With
For Each c In Range("c1", "c" & intNumRows)
lngCellTotal = lngCellTotal + c.Value
Next
Range("c" & intNumRows + 1) = lngCellTotal

end sub
 
B

Bob Phillips

Where has this digressed from B to I?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top