Total of a row

MJA

Board Regular
Joined
Feb 18, 2002
Messages
79
Hello Mr. Excel,

I have a serie of numbers that can vary, the
serie always starts in A1 and can go till Ax.
In the cell next to Ax I want the total.
How do I do that?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
On 2002-02-21 12:53, MJA wrote:
Hello Mr. Excel,

I have a serie of numbers that can vary, the
serie always starts in A1 and can go till Ax.
In the cell next to Ax I want the total.
How do I do that?

I'm assuming you mean "Ax" to be, for example, "A10" or however many rows the "A" column occupies. So you're really wanting the total of a column, not the total of a row.

The most common suggestion here is to put the total at the top of a column. In this case, make "A1" the total. You could then put a formula like :

<pre> =SUM(A2:A65536) </pre>

This way it doesn't matter how many rows you use.

HTH
 
Upvote 0
On 2002-02-21 13:16, Mark O'Brien wrote:
On 2002-02-21 12:53, MJA wrote:
Hello Mr. Excel,

I have a serie of numbers that can vary, the
serie always starts in A1 and can go till Ax.
In the cell next to Ax I want the total.
How do I do that?

I'm assuming you mean "Ax" to be, for example, "A10" or however many rows the "A" column occupies. So you're really wanting the total of a column, not the total of a row.

The most common suggestion here is to put the total at the top of a column. In this case, make "A1" the total. You could then put a formula like :

<pre> =SUM(A2:A65536) </pre>

This way it doesn't matter how many rows you use.

HTH

Sorry! (It's late in Holland)

I mean A1, B1, C1, D1 .......... to x1.

The answer (total) must stand in the cell next to x1.

Thanks for your quick reply!

Can you help me again?!?!
 
Upvote 0
There's no really easy way to do that, I'm assuming you mean automatically. You would have to use VBA and have a button or toolbar to run it. How do you put the data into the sheet? If it's done manually then it wouldn't cost you much time do the sum formula manually.

To do it manually you would just go to the last cell, for example "BV1", then type in something like:

<pre> =SUM(A1:BV1) </pre>

HTH

****, Feyenoord only drew with Rangers.
 
Upvote 0
Hello in Holland! Something like this work?

Sub For_Holland()
Application.ScreenUpdating = False
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveWorkbook.Names.Add Name:="money", RefersToR1C1:=Selection
Range("a1").Select
Selection.End(xlToRight).Select
Application.ScreenUpdating = True
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "=SUM(money)"
Selection.Copy
Selection.PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
ActiveWorkbook.Names("money").Delete
End Sub


Cheers, Nate
This message was edited by NateO on 2002-02-21 14:36
 
Upvote 0
A macro is not necessary.

If your data is in A1:J10, put the following formula in K10 :-
=SUM(A1:OFFSET(K10,0,-1))

The formula will automatically adjust when columns are inserted/deleted.
 
Upvote 0
But VBA is our friend! This way no cutting or pasting or scrolling or typing, etc...Just run the macro and voila.

Cheers,

Nate
 
Upvote 0
On 2002-02-21 16:57, NateO wrote:
But VBA is our friend! This way no cutting or pasting or scrolling or typing, etc...Just run the macro and voila.

Cheers,

Nate


I don't know what you're talking about.

All that is required is to enter a simple formula once (just like any other formula) and voila - no further cutting/pasting/scrolling/typing AND no VBA.

What are you suggesting? Only enter formulas on worksheets by running macros?
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,264
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top