A pun on Google

  • Thread starter Thread starter steve
  • Start date Start date
Hello List,
I need to open a sheet and move down the first column till i find a
cell with no value. Then make that cell sum the column above it.
i tried to do this with a macro from Excel so i could see how the code
was created and failed badly.
Any ideas?

Bob
 
Dim cRows As Long

cRows = Cells(Rows.Count,"A").End(xlUp).Row
Cells(cRows+1,"A").FormulaR1C1 = "=SUM(R1C1:R[-1]C1)"

This is for column A, change the "A" and C1 if a different column required.

Why did you tag to an existing thread, you are likley to get missed this
way?
 
Thanks for responding.
I did not use an existing thread "Navagate Rows From MS Access" . I
composed the subject my self. Not sure how i tagged?

Since i am an Access guy i will have to figure out where "Cells" fits
in the Excel object model. And assign the proper object.

cRows = Cells(Rows.Count,"A") ' seems pretty straight forward.
Not sure about > .End(xlUp).Row
I will study and test.

Thanks again!

Bob


Dim cRows As Long

cRows = Cells(Rows.Count,"A").End(xlUp).Row
Cells(cRows+1,"A").FormulaR1C1 = "=SUM(R1C1:R[-1]C1)"

This is for column A, change the "A" and C1 if a different column required.

Why did you tag to an existing thread, you are likley to get missed this
way?

--

HTH

Bob Phillips

Hello List,
I need to open a sheet and move down the first column till i find a
cell with no value. Then make that cell sum the column above it.
i tried to do this with a macro from Excel so i could see how the code
was created and failed badly.
Any ideas?

Bob
 
Jon,

Thanks for the site. (have to wait until I get home, they don't let me
download at work).

steve
 
Back
Top