01-08-2021 10:22 AM
01-08-2021 10:22 AM
I hope someone can help, I've tried a few variations without success so far.
|Breed||This is a list of dog breeds||Choose from list|
|Gender||(Male or Female)||Choose from list|
|Target Weight||I want the weight here e.g.||populates from the choices above|
|BREED||Dog (kg)||**bleep** (kg)|
|Affenpinscher||3 to 7||3 to 4|
|Afghan Hound||27 to 32||23 to 30|
|Airedale Terrier||20 to 27||20 to 23|
I hope the above explains my situation.
01-08-2021 12:24 PM
If an Example is your source data, you may use INDEX(range,MATCH(),MATCH()) on it. First MATCH to select row from Breed list. Second MATCH to select column, or it simply could be =IF(Gender=Dog,1,2)
01-08-2021 12:25 PM
I did not get your need, i got confused with your example.
would you please share your file, so we can help.
01-09-2021 04:36 AM
I have two TABs one labelled (WeightGoals) and the other (Ideally Weight).
On the weight tab, I enter the start date (8-Jan) and the starting Weight 15.3, below I select the breed from a list populated from the Tab (Ideally Weight).
Ideally Weight (TAB)
So selecting the Breed (Airedale Terrier) then the gender (Male) it would give me a Target Weight of
20 to 23
01-09-2021 04:51 AM
When as suggested before. Drop-down list for the Breed will be Ideally Weight[Breed] column, for Gender just Male,Female.
If we name as Range data in both Male and Female columns of Ideally Weight, when Target Weight could be taken as
=INDEX(Range, MATCH(Breed, IdeallyWeight[Breed], 0), IF(Gender="Male",1,2) )
01-10-2021 07:10 AM
When entering that formula I get a #NAME? error
Ideally Weight (TAB)
I really appreciate your support in this
01-10-2021 09:38 AM
I guess you didn't define names Breed, Range and Gender in workbook. Alternatively you may use proper cell references.
01-10-2021 10:38 AM
01-10-2021 11:17 AM
@Peter Bartholomew , thank you.
I'd modify a bit
= LET( split, FIND("to", TargetWeight), lowerLimit, --TRIM(LEFT( TargetWeight, split-1 )), upperLimit, --TRIM(RIGHT(TargetWeight,LEN(TargetWeight)-split-2)), result, IF( StartWeight < lowerLimit, TEXT(1 - StartWeight/lowerLimit, "0%") & " under weight", IF( StartWeight > upperLimit, TEXT(1-upperLimit/StartWeight, "0%") & " over weight", "Within normal bounds")), result )
01-10-2021 12:01 PM
Oops! Thanks for the tidying up. I had been called for a meal and clearly didn't pay enough time to checking.
01-11-2021 02:36 AM
01-11-2021 03:59 AM
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
01-11-2021 05:20 AM
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.
01-11-2021 05:36 AM
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
it 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?
01-12-2021 06:26 AM
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.
01-12-2021 08:21 AM
@UKAndy , I'll try, but on which version of Excel you are, do you have LET() function available?
01-12-2021 08:50 AM
Somewhere above I noticed that @Sergei Baklan had recommended the conversion of your reference data to a Table. I would recommend the same but I take it further. I use Tables and structured references and try to avoid any direct referencing using cell addresses. In the workbook that Sergei was kind enough to correct I had converted the data to a table but it wasn't obvious because I tend to remove the stripes and filters.
I have had an idea for comparing the animal weight with a band of normal weight that does not depend upon constructs with nested IFs. If you consider the 3 weights, breed maximum, breed minimum and actual weight, the formula
= MEDIAN( actual, minimum, maximum )
will return the closest bound. The percentage over/underweight is then given by
= StartWeight/result - 1
If you introduce number formatting to the result, you can add the "over/underweight" to the displayed value, depending upon the sign of the result. If the dog's weight is "Within normal bounds", the formula will give zero and the appropriate message displayed.
p.s. Glad to see from the later document that my Newfoundland dog is spot on target!