![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Hengelo
Posts: 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?
__________________
Best regards, Martin J.A. Maatman Oonk |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Quote:
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 : =SUM(A2:A65536) This way it doesn't matter how many rows you use. HTH |
|
|
|
|
|
|
#3 | ||
|
Board Regular
Join Date: Feb 2002
Location: Hengelo
Posts: 79
|
Quote:
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?!?!
__________________
Best regards, Martin J.A. Maatman Oonk |
||
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
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: =SUM(A1:BV1) HTH Damn, Feyenoord only drew with Rangers. |
|
|
|
|
|
#5 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
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 ] |
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
Quote:
|
|
|
|
|
|
|
#7 | ||
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Quote:
|
||
|
|
|
|
|
#8 |
|
Join Date: Feb 2002
Posts: 47
|
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. |
|
|
|
|
|
#9 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
But VBA is our friend! This way no cutting or pasting or scrolling or typing, etc...Just run the macro and voila.
Cheers, Nate |
|
|
|
|
|
#10 | |
|
Join Date: Feb 2002
Posts: 47
|
Quote:
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? |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|