View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Formula to sum rows

I have a database query that runs by a date range which can return different
amount of data based on date range this is the formula that i hand type into
cells
Can someone maybe help me with a formula to run a macro for this

Thanks mike

Range("G12").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-2]-RC[-3])"
Range("H12").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-2]*RC[-1])"