Forum Discussion
Complex equations with multiple input values
So
I'm looking to create a sheet that will do some food math for me. I struggle with excel and I cannot for the life of me figure out how to do this- the online tutorials just make it worse. I'm in vetmed and I know a lot about animal medicine but technology escapes me.
I need a sheet that I can input the following info: pt weight (ideal) and illness factor (decided by the DVM on the case) and have it generate the RER (resting energy requirement) for each patient.
Once this is generated, I need to be able to take the RER number and have it calculate how many cans per day each pet needs (based on the kcal per can of each diet).
Is there a way that I can preprogram all the diets we offer into the sheet (like if someone types in a shorthand code, the kcal per can will populate)?
Any insight would be helpful at this point.
Thanks!
3 Replies
- ct08Copper Contributor
Hello,
Thanks for your response, and sorry for not providing much info- I'm still pretty new to this. I'm using Microsoft 365 so I'm assuming that means it's Excel 365, and I'm using it on a Windows laptop.I was able to figure out how to do the "= cell number +-*/ cell number" thing so the actual calculation problem has been solved. I'll take a look at the sheet you've attached here and come back with any additional questions. Thank you so much for your help!
-Chris
PS. I'm loving the "doggus slobberus" bit!
- SnowMan55Bronze Contributor
That's not a lot of information you are giving us. For starters, which Excel product (Excel 365, Excel 2019, etc.) are you using, on which platform (Windows, Mac, the web...)? Sometimes, the solution requires an Excel function or feature that is not present in older products.The Excel formulas will depend on a number of factors; see the Calculations worksheet in the attached* file for my guesses. Collecting those factors into one sheet, separate from the reference data, makes things clearer.
And without further information, I will assume that a larger Illness Factor should result in a larger MER. (I multiply the RER by the Illness Factor to get the MER.)There should be no reason for the users to enter a shorthand notation for the food product; selection from a dropdown list of the product names (possibly including container sizes) should be made available. Excel's Data Validation feature allows this. If any of your offered diets involve multiple food products, some design changes would probably be needed.
But this should give you a start, and help you develop ideas for the design. Read the _Info worksheet for more information and references to documentation/tutorials.
* The "attached" file might not be attached. Following a change to this forum's software in November, files that we attach frequently disappear. If the attach does not work, I will put the file on OneDrive and post a link to it.
Edit: retrying the attach
Edit #2: That did not work, so get the workbook here: 2026-01-07 CT08 feeding calcns.xlsx
- NikolinoDEPlatinum Contributor
I’ll break it down clearly and step by step so it’s easy to follow.
Step 1: Set up your input sheet
- Open Excel and create a new sheet called Calculator.
- In column A, put your input labels:
Cell
Label
A1
Patient Name
A2
Ideal Weight (kg)
A3
Illness Factor (unitless)
A4
Diet Code
3. In column B, these will be your inputs:
Cell
Input Example
B1
Fluffy
B2
5
B3
1.2
B4
D1
Step 2: Calculate RER
The standard RER formula for mammals is:
In Excel, in cell B5, type:
=70*(B2^0.75)*B3
- B2 = ideal weight
- B3 = illness factor
Label A5 as RER (kcal/day). This will now automatically calculate the resting energy requirement.
Step 3: Preprogram diets
- Make a new sheet called Diets.
- In column A, enter Diet Code, column B Diet Name, column C kcal per can:
A
B
C
D1
Puppy Diet
350
D2
Senior Diet
300
D3
Weight Management
250
You can add as many as you like.
Step 4: Pull kcal per can automatically
Back in the Calculator sheet, in cell B6 (label A6 = kcal per can), use a VLOOKUP formula:
=VLOOKUP(B4, Diets!A:C, 3, FALSE)
- B4 = Diet Code input
- Diets!A:C = range of diet data on the Diets sheet
- 3 = column number for kcal/can
- FALSE = exact match
Now, when you type D1, D2, etc., the kcal per can will automatically populate.
Step 5: Calculate cans per day
In cell B7 (label A7 = Cans per Day), type:
=B5/B6
- This divides the calculated RER by kcal per can to give the number of cans needed per day.
How it works
- Enter the patient’s ideal weight, illness factor, and diet code.
- Excel calculates the RER.
- It automatically pulls kcal per can based on diet code.
- It calculates how many cans/day the patient needs.
You can expand this:
- Add multiple patients in rows.
- Add more diets.
- Format numbers to 1 decimal place for neatness.
General Free Excel Template Libraries
These sites have tons of templates; most are not veterinary, but you can adapt them easily:
Site Name
Link
Notes
Microsoft Excel Templates (Official)
Large library, calculators, trackers, planners
Vertex42
Popular free templates; includes food/nutrition templates
Smartsheet
Curated templates, includes calculation sheets
Template.net
Thousands of free and editable Excel templates
WPS Office Templates
Free Excel-compatible templates, trackers, calculators
Food / Nutrition Templates (Closer to your needs)
Templates that include calories, food logs, or meal tracking — these are the best base for your RER/can calculations:
Template Name
Link
Notes
Food Calorie Calculator
Simple food calorie totals; can adapt for kcal per can
Daily Calorie Counter Excel Template
Tracks daily calories; adaptable for pets
Recipe Nutrition Calculator Template
Calculates calories/macros for recipes
Free Calorie Tracker Spreadsheet
Weekly tracker template; formulas in place
Diet & Nutrition Tracker Templates
Meal diary & nutrition log; adaptable structure
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and like it!
This will help all forum participants.