A pun on Google

B

bob

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
 
B

Bob Phillips

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?
 
B

bob

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
 
S

steve bell

Jon,

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

steve

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top