+ Reply to Thread
Results 1 to 20 of 20

Calculations for total body weight lost/gained.

  1. #1
    Registered User
    Join Date
    01-20-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9

    Calculations for total body weight lost/gained.

    Hello everyone,

    I am trying to create a weight management, measurements and bodyfat spreadsheet which will automatically calculate the amount of weight or bodyfat etc gained or lost. I will then place this in a graph to show my client how well/bad they are doing.

    At the moment I have these weights and all I have done is taken the highest number away from the lowest number, which works fine, but when I start adding more weights and dates etc I have to constantly re-adjust the formulae.

    245
    239
    234
    227.5
    228.7
    225.3

    Total lost -19.7lbs

    Can anyone help me to get this to work please?

    Thanks in advance for any replies
    .
    Last edited by saitek; 01-20-2009 at 08:06 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    =min(a:a)-max(a:a) will give highest -lowest but that is flawed what if it goes higher than the start weight then comes down to something still higher than start weight then the result should be a net gain surely?
    Last edited by martindwilson; 01-20-2009 at 05:35 PM.

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Martin's formula will work, assuming they are consistently losing weight. But we all know how that goes...

    This may or may not work for you, depending on how your spreadsheet is set up. This assumes the start weight is in A2 (with a header in A1), there is nothing in column A except the weights, and they are entered contiguously (no blank cells).

    =A2-OFFSET($A$1,COUNTA($A:$A)-1,0)

    HTH

    Jason

  4. #4
    Registered User
    Join Date
    01-20-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    Very quick reply, thanks!

    Although that works well, I don't think I explained what I wanted very well though. If her weight suddenly went higher than her original weight half way through, the final amount lost will be much higher than it should.

    For example:
    245
    239
    234
    280.5
    228.7
    225.3

    -55.2lbs

    Although there was only -19.7lbs loss from her original weight till now. Is there anyway to kind of add and subtract one weight from the next?

    Sorry for not being clear.

  5. #5
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Saitek, did you see my reply? That will subtract the last entry from the original entry.

  6. #6
    Registered User
    Join Date
    01-20-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    Quote Originally Posted by jasoncw View Post
    Saitek, did you see my reply? That will subtract the last entry from the original entry.
    Just seen it now, I was replying, my apologies.

    I tried changing the area from A to H but I can't get it to work. Here is a screenshot to show you how it's set up. I have highlighted the correct area for clarity.

    http://img233.imageshack.us/my.php?i...tweightoh9.png
    Attached Images Attached Images
    Last edited by saitek; 01-20-2009 at 05:57 PM.

  7. #7
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Sorry, I can't see that file (blocked by firewall). Please upload to this thread by clicking the Manage Attachments button.

  8. #8
    Registered User
    Join Date
    01-20-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    Quote Originally Posted by jasoncw View Post
    Sorry, I can't see that file (blocked by firewall). Please upload to this thread by clicking the Manage Attachments button.
    I have attached it now.

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    another way is to match a big number it will always give the last value and you dont have to worry about blanks or text
    =A2-INDEX(A:A,MATCH(10^6,A:A))
    start weight in a2
    (ok iknow 10^6 is not THE big number but if someone goes over a million kilos i'll be ever so slightly surprised)
    Last edited by martindwilson; 01-20-2009 at 06:08 PM.

  10. #10
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Here is a different solution, based on your workbook. Try:

    =INDIRECT("R[-1]C",0)-H7

    HTH

    Jason

  11. #11
    Registered User
    Join Date
    01-20-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    Quote Originally Posted by martindwilson View Post
    another way is to match a big number it will always give the last value and you dont have to worry about blanks or text
    =A2-INDEX(A:A,MATCH(10^6,A:A))
    start weight in a2
    (ok iknow 10^6 is not THE big number but if someone goes over a million kilos i'll be ever so slightly surprised)
    This seems to work, only problem is it doesn't seem to show a negative value only when the weight has gone up.

    Quote Originally Posted by jasoncw View Post
    Here is a different solution, based on your workbook. Try:

    =INDIRECT("R[-1]C",0)-H7

    HTH

    Jason
    This one doesn't seem to work unfortunately.

    ----------

    Thanks for all the help so far, I really appreciate it!

  12. #12
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    From your uploaded screenshot, did you include the formula in cell H13?

  13. #13
    Registered User
    Join Date
    01-20-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    Quote Originally Posted by jasoncw View Post
    From your uploaded screenshot, did you include the formula in cell H13?
    Oh, I see where I went wrong now. I have been tweaking the design and have added in more dates etc so there is more space. See attachment.

    I do apologise for messing you around, it wasn't intentional.
    Attached Images Attached Images
    Last edited by saitek; 01-20-2009 at 06:57 PM. Reason: Too many quotes.

  14. #14
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Ok, let's try this again.

    =OFFSET(H$6,COUNTA(INDIRECT("R6C:R[-1]C",0))-1,0)-H$7

  15. #15
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949
    I believe Jasons suggestion of
    Please Login or Register  to view this content.
    This does work, but it can not be placed in the same column as the information is posted in, since it is the last item in the column, it would return A2-self as a value, which therefore makes Excel palm-face itself.
    Attached Files Attached Files
    Last edited by mewingkitty; 01-20-2009 at 07:15 PM.
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  16. #16
    Registered User
    Join Date
    01-20-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    Quote Originally Posted by jasoncw View Post
    Ok, let's try this again.

    =OFFSET(H$6,COUNTA(INDIRECT("R6C:R[-1]C",0))-1,0)-H$7
    Thanks very much, this one seems to work very well!! I have been trying to get this all sorted pretty much the whole day!!

    Thanks to everyone who helped out I appreciate all your help and time.

  17. #17
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Glad it worked for you. Please mark the thread solved. Thanks.

    Jason

  18. #18
    Registered User
    Join Date
    01-20-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    Quote Originally Posted by jasoncw View Post
    Glad it worked for you. Please mark the thread solved. Thanks.

    Jason
    One very last thing....

    Is there anyway to add a "+" sign before any of the results that are in the positive?

  19. #19
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949
    format cells, choose custom, and place

    Please Login or Register  to view this content.
    in the entry bar

  20. #20
    Registered User
    Join Date
    01-20-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    Quote Originally Posted by mewingkitty View Post
    format cells, choose custom, and place

    Please Login or Register  to view this content.
    in the entry bar
    Just had to tweak it slightly, but it's perfect.

    Thanks a lot!

+ 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