ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding two columns ...please help (https://www.excelbanter.com/excel-programming/391334-adding-two-columns-please-help.html)

jack

Adding two columns ...please help
 
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

Gord Dibben

Adding two columns ...please help
 
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

On Thu, 14 Jun 2007 11:46:01 -0700, Jack wrote:

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



jack

Adding two columns ...please help
 
Thanks Gord!!!!!!!!!!

"Gord Dibben" wrote:

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

On Thu, 14 Jun 2007 11:46:01 -0700, Jack wrote:

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





All times are GMT +1. The time now is 04:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com