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.
If you don't mind I converted Ideally Weight to Table. With that if you add/remove data no need to change the formula which could be
=INDEX(IdeallyWeight,MATCH(C5,IdeallyWeight[BREED],0),MATCH(C6,IdeallyWeight[#Headers],0))Brilliant!! AWESOME!!
However,
What does 'Unprotected Formula' relate to?
Also, for reasons the (B10 Kgs to) and (B11 Target date) is not displaying now, on the WeightGoals Tab, this worked out the Kgs difference + or - from the (Start Weight C4) and the (Target Weight C7) and entered it into C10 then used the value in (C8 Kgs per week) to give a target date in C11.
So with Doberman selected weight 15.3Kgs, gaining (1Kg per week), it would give a value of (C10 Kgs to 14.2 - 20.7) , which would give (C11 Target Date 16th April to 28th May).
It would workout a + or - value for gain or lose weight.
I hope I've explained myself fully, I know what I'm looking for in my head, it's putting it down in words.
- 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.
- UKAndyJan 13, 2021Copper Contributor
- UKAndyJan 13, 2021Copper Contributor
- SergeiBaklanJan 13, 2021Diamond Contributor
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) - UKAndyJan 12, 2021Copper Contributor
- SergeiBaklanJan 12, 2021Diamond Contributor
UKAndy , I'll try, but on which version of Excel you are, do you have LET() function available?
- UKAndyJan 12, 2021Copper Contributor
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.
- SergeiBaklanJan 11, 2021Diamond Contributor
I touched nothing but formula.
Unprotected formula - cells in your sheet are unlocked, don't know why. That means if you protect the sheet, these cells will be editable. That's what the alert says about. I locked the cell, but only this very cell, since don't know what is the logic behind unlocking. To lock/unlock select cell(s), Ctrl+1 and choose desired setting in the Protection tab.
B10 and B11 - not sure what you'd like to display here. Your initial formula is
=IF(COUNT(C4:C7)<2,0,C4-C7)*TypeMultit counts numbers in C4:C7. Since only Start Wight is the number in the range, it returns 1, thus result is zero. What it shall be here?