View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default Find last cell in column then SUM in cell directly below

I'm not sure I understand, but try:

..Offset(2, 0).Formula = "=Sum($G$1" & ":" & .Address & ")"
__________________________________________________ _______________________

"Giggly4g" wrote in message
...
That gets the entry into the correct area. Thank you!

Now I just need to figure out why the resulting cell is showing the
following...

"Sum($G$1$G86)" this is not a formula by the way; it is coming in as a
text entry.

I took a look at what the code looks like when you use the SUM function...

"ActiveCell.FormulaR1C1 = "=SUM(R[-87]C:R[-2]C)"

I tried adding in the additional = but received an error message when I
ran
the macro. So, what is wrong with this line?

.Offset(2, 0).Formula = "Sum($G$1 & .Address & ")"

"Mike" wrote:

Try This
If IsEmpty(.Cells(.Rows.Count, 7)) Then
With .Cells(.Rows.Count, 7).End(xlUp)


"Giggly4g" wrote:

Hi! I need to locate the last cell with data in a column then go to the
cell
directly beneath it and add in the sum function. The GoTo blank
function
doesn't work because some of the cells within rows are blank. The
number of
rows varies from day-to-day. I need to do this for several columns of
the
worksheet. Your assistance is greatly appreciated.