Total of a row - Page 2
Upcoming Power Excel Seminars
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Total of a row

  1. #11

    Join Date
    Feb 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    In any event, I don't think much of your code.
    All that is needed is :-

    Sub For_Holland()
    [A1].End(xlToRight)(1, 2).Value = Application.Sum(Range([A1], [A1].End(xlToRight)))
    End Sub

  2. #12
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Another option, a Named Formula.

    Select B1. This is IMPORTANT
    Go to Insert, Names, Define.

    In the first box type SumLeft, and in the Refers To, put this formula:


    =SUM(Sheet1!$A1:A1)


    Now, you can use it in a cell like this

    =SumLeft

    and it will Sum from Column A to the one on the left of that cell. It also adjustes automatically to insert or delete of columns.
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  3. #13

    Join Date
    Feb 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You said "unlike your original post, I was trying to answer the question". Oh? My original post certainly did answer the question! Have you tried the formula I suggested?

    Still don't see the point of suggesting a macro when a simple worksheet formula does the job.

    Was trying to help by offering improved code - thought you might be able to learn something.

  4. #14

    Join Date
    Feb 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-02-21 18:37, NateO wrote:
    The way I interpreted the question was that the placement of the sum formula, which varies, is equally as important as the function itself. To properly place the function, vba is required.

    I do like your streamlined vba, the tone of the post is a little much for me. I get on here to help people, not to impress more experienced users necessarily.

    It's all good. Cheers, Nate

    You said "To properly place the function, vba is required."

    This is simply NOT true! All that is required is to enter the formula once manually - just like entering any formula.

    (You seem a trifle upset. If you promise not to cry, I'll buy you a lollipop.)

  5. #15
    Guest

    Default

    Tu ne parles pas anglais?

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

    zuts alors

  6. #16

    Join Date
    Feb 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-02-21 19:00, NateO wrote:
    Tu ne parles pas anglais?

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

    zuts alors

    What is your point Miss Oliver?
    When entering the formula, put it in cell x1.

    I'm bored with this. Goodbye.



  7. #17

    Join Date
    Feb 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-02-21 19:08, Tikas A. Planck wrote:
    What is your point Miss Oliver?
    When entering the formula, put it in cell x1.

    I'm bored with this. Goodbye.
    Should read :-

    When entering the formula, put it in the cell next to cell x1.

  8. #18
    Board Regular
    Join Date
    Feb 2002
    Location
    Hengelo
    Posts
    79
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-02-21 17:56, Tikas A. Planck wrote:
    In any event, I don't think much of your code.
    All that is needed is :-

    Sub For_Holland()
    [A1].End(xlToRight)(1, 2).Value = Application.Sum(Range([A1], [A1].End(xlToRight)))
    End Sub
    You're the man!
    Thank you
    You made my friday and weekend!
    Bye
    Best regards,

    Martin J.A. Maatman Oonk

  9. #19
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    81,807
    Post Thanks / Like
    Mentioned
    12 Post(s)
    Tagged
    1 Thread(s)

    Default

    Juan,

    It's an appropriate and judicious proposal.

    Aladin

    On 2002-02-21 17:58, Juan Pablo G. wrote:
    Another option, a Named Formula.

    Select B1. This is IMPORTANT
    Go to Insert, Names, Define.

    In the first box type SumLeft, and in the Refers To, put this formula:


    =SUM(Sheet1!$A1:A1)


    Now, you can use it in a cell like this

    =SumLeft

    and it will Sum from Column A to the one on the left of that cell. It also adjustes automatically to insert or delete of columns.

  10. #20
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      

    On 2002-02-21 17:58, Juan Pablo G. wrote:
    Another option, a Named Formula.

    Select B1. This is IMPORTANT
    Go to Insert, Names, Define.

    In the first box type SumLeft, and in the Refers To, put this formula:


    =SUM(Sheet1!$A1:A1)


    Now, you can use it in a cell like this

    =SumLeft

    and it will Sum from Column A to the one on the left of that cell. It also adjustes automatically to insert or delete of columns.
    I'm having problems getting this work, am I using it correctly?

    I've went to B1, selected Insert|Name|Define, declared SumLeft as the name and copied you formula into the "refers to section".

    TO test this I typed in number in A1:E1, then in F1 put in "=SumLeft". It's giving me "0".

    I'd like to get this to work just out of interest. I hardly ever use Excel for data entry and summations etc and would like to get better at it.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com