+ Reply to Thread
Results 1 to 21 of 21

Totals not coming out correct.

  1. #1
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12

    Totals not coming out correct.

    I have been working on a Spreadsheet for GVWR (Gross Vehicle Weight Ratings). I'm having a problem with the Formulas in Excel, I thought you may know what's going on and why it's not giving me the right data. I'm pretty good with Excel, I've been using it for about 17 years for calculating Tank formulas, etc, but have never run in to this before.

    I have three columns to the right of the sheet. One is Stock Vehicle weight of an item____(E) The next column is the Aftermarket weight of the item______ (F) Then the third column (G) is the total weight minus the stock weight using a very simple formula =SUM(E6-F6) gives the correct weight in the third column, but at the end of each area (Topic) i have a Total Weight area in the third column (G), using the formula of =SUM(G6:G26) which should just add up everything in column G, but it doesn’t. I have re-made the spreadsheet three times, I can't figure out what I'm doing wrong...any idea's. I know it's smoething real simple that I'm missing. I feel like such a N00b. :lol:

    Thanks

    Mike
    Last edited by VBA Noob; 12-17-2008 at 06:24 PM.

  2. #2
    Forum Contributor Kieran's Avatar
    Join Date
    10-02-2003
    Location
    Perth, Western Australia
    MS-Off Ver
    Office 2003
    Posts
    109
    The formula in G seems to be backwards from your explanation.
    Total weight minus the stock weight would be =F6-E6, not =E6-F6 (note the SUM() formula is not required here.

    If this error is the case and you have amended the cell formats in column g to not show negative numbers clearly, then the Topic total could be incorrect.
    Try selecting the range G6 to G26 and format the cells as general. It should show up if there is an error ins displaying negative numbers.
    Kieran

  3. #3
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    Can you post a sample worksheet?

  4. #4
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12
    Quote Originally Posted by Kieran View Post
    The formula in G seems to be backwards from your explanation.
    Total weight minus the stock weight would be =F6-E6, not =E6-F6 (note the SUM() formula is not required here.

    If this error is the case and you have amended the cell formats in column g to not show negative numbers clearly, then the Topic total could be incorrect.
    Try selecting the range G6 to G26 and format the cells as general. It should show up if there is an error ins displaying negative numbers.
    I just tried what you said, I made it general and also removed the sum in the G column, it still is reducing the total at the buttom and you can see the formula in the upper left corner of what the total is? I don't know what's happening, it's a simple addition and subtraction formula, but it will not total at the bottom, it will subtract instead. I even made it a General" instead of "Number" with no -. I did a screen capture, I hope you can see what I'm talking about.

    \1

    Thanks everyone.

    Mike
    Last edited by Shadow-Warrior; 12-18-2008 at 10:03 AM.

  5. #5
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12
    Any Idea's Thanks


    Mike

  6. #6
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    The total in G21 appears to be -3, which seems to be correct.
    This appears to be made up of -5 in G10, and +3 in G13.
    The -5 in G10 arises because there is no after-market weight in F10.

    Does this help?
    Regards
    Mike

  7. #7
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12
    Quote Originally Posted by Mikeopolo View Post
    The total in G21 appears to be -3, which seems to be correct.
    This appears to be made up of -5 in G10, and +3 in G13.
    The -5 in G10 arises because there is no after-market weight in F10.

    Does this help?
    Regards
    Mike
    Not really, that is the way it's supposed to be. You need to look at the bottom at the Total where is shows "2" instead of adding the total, it's subtracting it. You can see in the upper left corner the formula which should be correct, but it's not adding them up, it's deducting the numbers.

    I do want it to deduct the weight from a stock item then give the left over weight, which I then can add up to see exactly how much weight has been added. Make sense?

    G21 needs to add up all the numbers in the "G" column, but it's subtracting. What am I doing wrong?
    Last edited by Shadow-Warrior; 12-18-2008 at 01:56 PM.

  8. #8
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    Sorry, I should have written: The total in G21 appears to be -2, which seems to be correct.
    The -2 in G21 appears in red, as does the -5 in G10, whereas the +3 in G13 appears in black.
    If you format column G to general, it should show the minus sign.
    Do you agree that G10 shows -5?

  9. #9
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12
    Quote Originally Posted by Mikeopolo View Post
    Sorry, I should have written: The total in G21 appears to be -2, which seems to be correct.
    The -2 in G21 appears in red, as does the -5 in G10, whereas the +3 in G13 appears in black.
    If you format column G to general, it should show the minus sign.
    Do you agree that G10 shows -5?
    I think I see what your saying, because it's in red means it's (-5) that make sense, but not what I want it to do, it should be in black as a 5 lbs. not minus 5 lbs, this maybe the problem then. If that's the case, how do i make it read so if there is no other number to deduct, it dosen't make it a minus and just keep the orginal weight "5" Thanks for your help Mike


    Mike

  10. #10
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    OK that's progress!
    Make the formula in G8: =max(E8,F8), and copy to all the data rows of that column.
    This will show the original weight if no aftermarket weight is provided.
    Regards
    Mike

  11. #11
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12
    Quote Originally Posted by Shadow-Warrior View Post
    I think I see what your saying, because it's in red means it's (-5) that make sense, but not what I want it to do, it should be in black as a 5 lbs. not minus 5 lbs, this maybe the problem then. If that's the case, how do i make it read so if there is no other number to deduct, it dosen't make it a minus and just keep the orginal weight "5" Thanks for your help Mike


    Mike
    So what your saying is I'm using the wrong formula in the "G" column? What should I use instead of a =(F8-E8) ?

  12. #12
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12
    Quote Originally Posted by Mikeopolo View Post
    OK that's progress!
    Make the formula in G8: =max(E8,F8), and copy to all the data rows of that column.
    This will show the original weight if no aftermarket weight is provided.
    Regards
    Mike
    Thats It! Thank You, Thank You! Your the man Mike! Thank you sir, this had me baffled for the last four days, I tired all kinds of things, but that. Thanks again.

    Mike

  13. #13
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12
    Quote Originally Posted by Shadow-Warrior View Post
    Thats It! Thank You, Thank You! Your the man Mike! Thank you sir, this had me baffled for the last four days, I tired all kinds of things, but that. Thanks again.

    Mike
    Opp's, not to fast, I was wrong, now it's not deducting the numbers in Column E it's just keeping what's in "F"....bummer, I thought we had it.

    Mike

  14. #14
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12
    Ok, let's take it from a different angle. Let's start fresh, here is what I want to do, and you tell me how to accomplish this.

    I want to have a number in column “E”, I then want to input a different number in Column “F” then have Column “G” subtract both E & F giving a final number. Then I want to total the numbers at the bottom in column G.

    I thought it would look like this E = No Formula, F = No Formula, G =MAX(E8-F8), then Total of G =SUM(G8:G19)

  15. #15
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    Sorry for my poor logic
    I think you want the extra weight in G, and it should read 0 if there is no extra weight

    Try this in G8 and copy down:
    =max(f8-e8,0)

  16. #16
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12
    Quote Originally Posted by Mikeopolo View Post
    Sorry for my poor logic
    I think you want the extra weight in G, and it should read 0 if there is no extra weight

    Try this in G8 and copy down:
    =max(f8-e8,0)

    It works, but if there is a number by it self in column "E" column "G" dosen't see it and keeps a "0" there.....


    Mike

  17. #17
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    Ok, but what does column G mean - its heading says "Added weight", so if there's no aftermarket weight, the added weight is 0?

  18. #18
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    A suggestion: rather than trying to figure out formulas, perhaps you could explain exactly what each column represents, and what result you're trying to calculate.

    Addition and subtraction shouldn't be this hard.
    Entia non sunt multiplicanda sine necessitate

  19. #19
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12
    Quote Originally Posted by Mikeopolo View Post
    Ok, but what does column G mean - its heading says "Added weight", so if there's no aftermarket weight, the added weight is 0?
    True, the last formula does work, I made the mistake of inputing a number in E when there was no reason I should unless there was another number for F. Thanks Mike, that is the correct formula. It works.

    Quote Originally Posted by shg View Post
    A suggestion: rather than trying to figure out formulas, perhaps you could explain exactly what each column represents, and what result you're trying to calculate.

    Addition and subtraction shouldn't be this hard.
    I agree, I guess it's kind of hard sometimes to get a point accross by keyboard. It's easier to speak and explain yourself a lot better. LOL

    Thanks everyone, especially you Mike.

    Mike

  20. #20
    Forum Contributor
    Join Date
    01-18-2005
    Location
    Auckland New Zealand
    MS-Off Ver
    Office Professional 2007
    Posts
    295
    No problem; it's good to know you have a solution now. Time for a coffee break!

  21. #21
    Registered User
    Join Date
    12-17-2008
    Location
    Arkansas
    Posts
    12
    Quote Originally Posted by Mikeopolo View Post
    No problem; it's good to know you have a solution now. Time for a coffee break!
    I agree, have one on me Cheers!

    Thanks again, Mike



    Mike

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1