+ Reply to Thread
Results 1 to 13 of 13

Google sheets: Calculate weight lost

  1. #1
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Google sheets: Calculate weight lost

    Hi guys,

    Is anybody able to guide me on how I can calculate weight lost in my spreadsheet here:

    https://docs.google.com/spreadsheets...it?usp=sharing

    See Cell G13.. it references cell B11-T11 which will have weight populated (which will fluctuate). I think what I have is halfway to what I want. but my formulas results in G13 including the following week (i.e. the current weight in the calcualation, is there a way I can setup the formula to not include my existing weight?)

    Thank you!
    Thanks,

    R.



  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Google sheets: Calculate weight lost

    Please post your sheet here.

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Google sheets: Calculate weight lost

    That sheet is protected so we can't edit it.

    I can see this formula in G13 and it doesn't seem right.

    =INDEX(B11:T11,1,COUNT(B11:T11))-A11

    As far as I can see =INDEX(B11:T11,1,COUNT(B11:T11)) is always going to return the last value in B11:T11, even if that value is 0 and the rest of the range is 0.
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Google sheets: Calculate weight lost

    HI Glenn,

    My sheet is attached (it's converted to excel now from google).

    Thank you!
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Google sheets: Calculate weight lost

    Hi Norie,

    Sorry there's a lot of protected cells.

    What are you implying with the formula being wrong and returning the last value? I guess I don't want the last value to be counted... could you possibly tell me what the alternative formula should be?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,432

    Re: Google sheets: Calculate weight lost

    Unprotect the cells!!! How can you expect people to help properly without giving them proper access to the data?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Google sheets: Calculate weight lost

    Sorry Ali, I have done this now.

  8. #8
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Google sheets: Calculate weight lost

    Quote Originally Posted by rayted View Post
    Hi Norie,

    Sorry there's a lot of protected cells.

    What are you implying with the formula being wrong and returning the last value? I guess I don't want the last value to be counted... could you possibly tell me what the alternative formula should be?
    Norie - I am now using this: =A5-INDEX(B5:T5,1,COUNT(B5:T5))

    however if one puts on weight (the figure in cells B5:T5 would be red and this seems to mess up the calculation)

    So for example losing weight, the calculation above works. If one puts on weight, the total weight lost is messed up because it is subtracting from the weight put on. How would you suggest I overcome this? Thank you!

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Google sheets: Calculate weight lost

    ??? Change A5 from

    =IFERROR(__xludf.DUMMYFUNCTION("IMPORTRANGE(""1Us7CRfa21tK-I7UVL9NpZT7K2cFbKEp-PJLLejXGbA8/edit?usp=sharing"", ""Sheet2!B8:N8"")
    "),"199.9lbs")

    to

    =IFERROR(__xludf.DUMMYFUNCTION("IMPORTRANGE(""1Us7CRfa21tK-I7UVL9NpZT7K2cFbKEp-PJLLejXGbA8/edit?usp=sharing"", ""Sheet2!B8:N8"")
    "),199.9)

  10. #10
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Google sheets: Calculate weight lost

    Quote Originally Posted by Glenn Kennedy View Post
    ??? Change A5 from

    =IFERROR(__xludf.DUMMYFUNCTION("IMPORTRANGE(""1Us7CRfa21tK-I7UVL9NpZT7K2cFbKEp-PJLLejXGbA8/edit?usp=sharing"", ""Sheet2!B8:N8"")
    "),"199.9lbs")

    to

    =IFERROR(__xludf.DUMMYFUNCTION("IMPORTRANGE(""1Us7CRfa21tK-I7UVL9NpZT7K2cFbKEp-PJLLejXGbA8/edit?usp=sharing"", ""Sheet2!B8:N8"")
    "),199.9)
    Thank you Glenn - but this is not importing my data (on google sheets anymore?) so i`m not sure this is working? i have unprotected my cells and can you advise if i am doing something wrong?

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Google sheets: Calculate weight lost

    I don't know the syntax used by googlesheets. Try this:

    =IFERROR(__xludf.DUMMYFUNCTION("IMPORTRANGE(""1Us7CRfa21tK-I7UVL9NpZT7K2cFbKEp-PJLLejXGbA8/edit?usp=sharing"", ""Sheet2!B8:N8"")
    "),"199.9")

    The lbs is turning it into text and the formula falls over.

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Google sheets: Calculate weight lost

    In Excel, another fix 9USING YOUR ORIGINAQL FORMULA IN a5)is:

    A11:
    =LEFT(A5,LEN(A5)-3)+0

    b11:
    =B5-A11 copied across

  13. #13
    Forum Contributor
    Join Date
    11-13-2015
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    831

    Re: Google sheets: Calculate weight lost

    Quote Originally Posted by Glenn Kennedy View Post
    In Excel, another fix 9USING YOUR ORIGINAQL FORMULA IN a5)is:

    A11:
    =LEFT(A5,LEN(A5)-3)+0

    b11:
    =B5-A11 copied across
    Hi Glenn,

    I still don't think this fulfils my requirement

    AS i need to share this with multiple individuals I am using google sheets. I guess I could try using excel online? However, my main sticking point is still the issue with counting the amount of weight lost!

    Update:

    Hi Glenn/all

    Please see this sheet, sheet3 tab:

    =SUMIF($A$1:$D$7,"<0"). - I have added in a new formula, but is there a way I can perhaps instruct the formula not to count the previous weight? or maybe exclude the count if B3 (weight from previous weigh in) is the same as A2(previous weigh in)?

    Looks like I need a SUMIF with an except/exception criteria. I'm just not sure how to apply this..... thanks for your help in advance
    Last edited by rayted; 08-16-2018 at 05:27 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Google Sheets: Subtract from a value (to show how much weight has been lost)
    By rayted in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 08-08-2018, 08:55 AM
  2. Weight lost code
    By RJ1969 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-26-2018, 12:10 PM
  3. Google Sheets: Calculate longest winning streak
    By yonifx in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 17
    Last Post: 12-28-2017, 01:43 PM
  4. Help calculating the total weight lost from starting weight D1
    By rgainey201 in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 12-31-2014, 06:16 PM
  5. Auto Calculate Shipping Weight/Cartons and Package Weight.
    By suhailsiddiqui09 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-27-2013, 06:48 AM
  6. Replies: 10
    Last Post: 01-28-2013, 07:41 PM
  7. Calculations for total body weight lost/gained.
    By saitek in forum Excel - New Users/Basics
    Replies: 19
    Last Post: 01-20-2009, 08:05 PM

Tags for this Thread

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