Adding two columns ...please help

G

Guest

Hi,

I have numbers in Column B and C. I need to see the value of =SUM(B1:C1)
that will appear in cell D1.
the value of SUM(B2:C2) that will appear in D2,the value of SUM(B3:C3) that
will appear in cell D3.
up to the end. I can do it in VBS but I need to know the way to see
SUM(B1:C1) in the Fx window when I'll click on the cell D1 when it's
generated by vbs
I don't know how to code it.
Thanks.
Joe
 
G

Gord Dibben

Jack

Maybe this?

Sub Auto_Fill()
Dim Lrow As Long
With ActiveSheet
Range("D1").Formula = "=B1+C1"
Lrow = Range("C" & Rows.Count).End(xlUp).Row
Range("D1:D" & Lrow).FillDown
End With
End Sub


Gord Dibben MS Excel MVP
 
G

Guest

Thanks Gord!!!!!!!!!!

Gord Dibben said:
Jack

Maybe this?

Sub Auto_Fill()
Dim Lrow As Long
With ActiveSheet
Range("D1").Formula = "=B1+C1"
Lrow = Range("C" & Rows.Count).End(xlUp).Row
Range("D1:D" & Lrow).FillDown
End With
End Sub


Gord Dibben MS Excel MVP
 

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