Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Calculation? 2

Status
Not open for further replies.

Yerdon

Programmer
Jul 29, 2002
62
US
Hi everyone,

I have the following columns and cells.

Code:
A   B   C   D   E   F   G   H   I   J
-------------------------------------
3   2   3   4   1   3   1   4   2   3

Then, I have a "master" cell which contains a value from A to J. Based on the contents of that cell, I would sum all columns up until that one. For example:

Master = C, then Total value = 8
Master = E, then Total Value = 13
Master = A, then total value = 3

How can I do such a thing?

Thanks in advance!

Joseph
 
Have a look at the INDIRECT function.

In A2, place whatever column header you want.

In an empty cell: [COLOR=blue white]=Sum(Indirect("A1:"&A2&"1"))[/color]

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top