Excel function to do this?

M

Mike

Hi,

Say I have this:


A B
1 1
1 2
3 5
2 7
4 11.....and so on


How can I produce column B (e.g., B5=A5+B1+B2+B3+B4)?


Thanks,
Mike
 
I

Ian Riches

G

Gord Dibben

Looks like an accumulated total of column A running down column B

In B1 =A1

In B2 =B1 + A2 drag/copy down.


Gord Dibben MS Excel MVP
 
R

Rick Rothstein

Here is the answer I gave in your other newsgroup posting...

The values you gave in Column B do not match the formula you said you want
in Column B. The values you put in Column B are derived by adding the values
in Column A from A1 to the row you are on; in other words, this formula
placed in B1 and copied down...

=SUM(A$1:A1)

However, to implement the formula relationship you said you wanted
(B5=A5+B1+B2+B3+B4), you would have to use these formulas in the indicated
cells...

B1: =A1
B2: =A2+SUM(B$1:B1)

and copy the formula in B2 down. When you do this, the formula relationship
you said you wanted would have produced the following data instead of what
you posted...

A B
1 1
1 2
3 6
2 11
4 24

So, which did you really want?

Rick Rothstein (MVP - Excel)




"Mike" wrote in message

Hi,

Say I have this:


A B
1 1
1 2
3 5
2 7
4 11.....and so on


How can I produce column B (e.g., B5=A5+B1+B2+B3+B4)?


Thanks,
Mike
 
R

Rick Rothstein

From a post by Jeff Johnson:

"You have posted this question individually to multiple groups.
This is called Multiposting and it's BAD. Replies made in one
group will not be visible in the other groups, which may cause
multiple people to respond to your question with the same answer
because they didn't know someone else had already done it. This
is a waste of time.

If you MUST post your message to multiple groups, post a single
message and select all the groups (or type their names manually
in the Newsgroups field, separated by commas) in which you want
it to be seen. This is called Crossposting and when used properly
it is GOOD."

Some additional comment previously posted by me:

"You may not see this as a problem, but those of us who volunteer
answering questions on newsgroups do see it as a problem. You can't
imagine how annoying it is for a volunteer to read a question,
research background material, test sample code and then formulate
and post an answer to the original question only to go to another
newsgroup and find the question posted and ALREADY answered over
there. On top of that, if you cross-post your question, all of the
readers in all the newsgroups it is cross-posted to see both the
original question and all of the answers given to it. This is
beneficial to you because then we can add additional material to,
add clarification to, as well as add additional examples to an
answer you have received previously... that means you end up with
a more complete solution to your problem. This is a win-win
situation for all of us."

And if you are using a web interface that does not allow you to specify
multiple newsgroups as indicated above, then simply pick one newsgroup, post
your message and **wait**... most of the volunteers here visit all the
newsgroups, so you should get the same answers anyway.

Rick Rothstein (MVP - Excel)




"Mike" wrote in message

Hi,

Say I have this:


A B
1 1
1 2
3 5
2 7
4 11.....and so on


How can I produce column B (e.g., B5=A5+B1+B2+B3+B4)?


Thanks,
Mike
 
C

Clif McIrvin

Rick, THANK YOU for your time putting that reply together! I've copied
in into my "boilerplate" folder for future use <grin>.

I posted a similiar response in another thread the other day, but it
wasn't nearly as complete as yours.

Clif

(BTW, that other thread did turn into a cross-posted thread.)

Rick Rothstein said:
From a post by Jeff Johnson:

"You have posted this question individually to multiple groups.
This is called Multiposting and it's BAD. Replies made in one
group will not be visible in the other groups, which may cause
multiple people to respond to your question with the same answer
because they didn't know someone else had already done it. This
is a waste of time.

If you MUST post your message to multiple groups, post a single
message and select all the groups (or type their names manually
in the Newsgroups field, separated by commas) in which you want
it to be seen. This is called Crossposting and when used properly
it is GOOD."

Some additional comment previously posted by me:

"You may not see this as a problem, but those of us who volunteer
answering questions on newsgroups do see it as a problem. You can't
imagine how annoying it is for a volunteer to read a question,
research background material, test sample code and then formulate
and post an answer to the original question only to go to another
newsgroup and find the question posted and ALREADY answered over
there. On top of that, if you cross-post your question, all of the
readers in all the newsgroups it is cross-posted to see both the
original question and all of the answers given to it. This is
beneficial to you because then we can add additional material to,
add clarification to, as well as add additional examples to an
answer you have received previously... that means you end up with
a more complete solution to your problem. This is a win-win
situation for all of us."

And if you are using a web interface that does not allow you to
specify multiple newsgroups as indicated above, then simply pick one
newsgroup, post your message and **wait**... most of the volunteers
here visit all the newsgroups, so you should get the same answers
anyway.

Rick Rothstein (MVP - Excel)
<...>
 
S

SS

Ouch! I dont cross post but this actually explains rather well as I was
never sure why a fuss was made for those that do.

thanks for the info.
 
G

Gord Dibben

SS

Re-read Rick's post.

I think you missed the distinction between cross-post and multi-post.


Gord Dibben MS Excel MVP
 

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