Forum Discussion
data validation on two cells gives result in third cell
- Jan 12, 2021
Hi,
The Weight Tracker is look great 🙂
So to explain, taking an Old English, she weighed in at 15.3Kg, her target weight is 23 to 27Kgs
Which means she is between 7Kg and 11.7Kg under her true weight.
In C10 it would give the difference from the weight and target weight
C11 it would give the date to the target weight in this case 23 to 27Kg if she gains 1 Kg a week, 7 to 11.7 weeks
Sorry if am not explaining myself right.
Back to initial file, "Kgs to..." could be
=LET(del, "to", startW, $C$4, targetW, $C$7,
pos, SEARCH(del, targetW),
minW, --TRIM(IF(ISNUMBER(pos), LEFT(targetW,pos-1), targetW)),
maxW, --TRIM(IF(ISNUMBER(pos), RIGHT(targetW,LEN(targetW)-pos-1), targetW)),
kg, IF(minW > startW, minW-startW, IF(maxW<startW, maxW-startW, 0)),
kg )
and Target Date
=IFERROR(IF(C8=0,"",C3+ABS(C10)/C8*7),C3)- PeterBartholomew1Jan 13, 2021Silver Contributor
I have placed the MEDIAN formula with SergeiBaklan 's (kg and kg0) and confirmed the results are the same.
- PeterBartholomew1Jan 13, 2021Silver Contributor
That is the idea of the formula with MEDIAN. It deals with the three options without requiring the use of conditional branches. The limitation is that the approach cannot be applied to an array of actual weights, since, like other aggregations, MEDIAN will give a single result for the entire array. I haven't looked at the latest workbook in any detail, so I do not know whether such array calculation will be needed.
- SergeiBaklanJan 13, 2021Diamond Contributor
UKAndy , you are welcome.
I didn't dig very deep, but current formula returns the same - underweight if less than min, overweight if over max and zero overwise. PeterBartholomew1 , that was an idea?
In any case, please suggest how exactly the logic shall be changed.