Forum Discussion
LynnDwight
Aug 02, 2023Copper Contributor
Formulas and Functions
I'm setting up a weight loss chart showing gain/loss each week. my question is how do i write the formula to take into account weather the last recorded weight is empty Also how to setup the formula to take into account how some months have four weeks and others have 5.
| JANUARY | APRIL | ||||
| Date | Weight | +/- | Date | Weight | +/- |
| 4 | 188.00 | 5 | 0.00 | ||
| 11 | 187.00 | 1.00 | 12 | 0.00 | |
| 18 | 185.00 | 2.00 | 19 | 0.00 | |
| 25 | 184 | 0.00 | 26 | 0.00 | |
| ##### | 0.00 | ||||
| FEBRUARY | MAY | ||||
| 1 | 181.00 | 3.00 | 3 | =B20-B21 | 0.00 |
| 8 | absent | ##### | 10 | above is the current formula | 0.00 |
| 15 | 180.00 | ##### | 17 | 0.00 | |
| 22 | 179.00 | 1.00 | 24 | 0.00 | |
| ##### | 31 | 0.00 | |||
| MARCH | JUNE | ||||
| 1 | 178 | ##### | 7 | 0.00 | |
| 8 | 177 | 0.00 | 14 | 0.00 | |
| 15 | 0.00 | 21 | 0.00 | ||
| 22 | 0.00 | 28 | 0.00 | ||
| 29 | 0.00 | 0.00 |
1 Reply
- mtarlerSilver ContributorI suspect in some cases you are getting an error so you can use IFERROR(.... ,"") to hide that error.
That said I think you would be best served to reorganize your sheet to only have
date, weight, difference
and get rid of the month headers/separators and not have the year broken into multiple sets of columns
If you want to see the month you can easily change the date format to show Month day, year (or day Month year if you prefer) or you can add another column to specifically just show the month.
but then your data will be continuous (except for that 'absent') and you will be able to do more with it and easier like make a graph or filter.