View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter Beach Peter Beach is offline
external usenet poster
 
Posts: 70
Default variable cell into range

Hi Dan,

Have you tried the worksheet formula =SUM(M:N)? Or perhaps (SUM(M5:N65536)?

If there are some particular constraints due to the design of your
spreadsheet you may need to explain what they are.

Regards,

Peter Beach

"Dan" wrote in message
...
Saw this mentioned a couple weeks ago, but never saw an answer... now
I ran into it.
The spreadsheet is approximately 30 columns by 6000 rows, sorted by
column C which is date. I need to find the last row with an entry
(date) in column C, then sum everything in columns M,N from the top
(M5,N5) down to that last row. How can I do SUM(M5:cell in last used
row) and place that sum in A2, I know some VB code but don't know how
to put a variable in a formula. Is it possible to have code in cell A2
that automatically refigures after new entries are put in and sorted?
I am trying to show the remaining balance in those columns after all
payments to date are deducted.