Thread: Summing
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Summing

TY Gord And TY Gary i wasent able to get Garys to work probably my dumb ...

"Gord Dibben" wrote:

Mike

Pick a column that has data all the way down to ascetain the last row(Lrow)

I used E

Sub Auto_Fill()
Dim Lrow As Long
With ActiveSheet
Lrow = Range("E" & Rows.Count).End(xlUp).Row
Range("G1:H" & Lrow).FillDown
End With
End Sub


Gord Dibben MS Excel MVP

On Sun, 18 Feb 2007 09:55:13 -0800, Mike wrote:

I have a database query that retuns data by date range. After the data is
returned
i enter in this formula in Columns G and H down to the last row of Data. Is
there a code to run a macro to do this

Thanks Mike

Column G
=SUM(E6-D6) ' Subtracts the New Price from Old Price
Column H
=SUM(F6*G6) ' New Price * QTY