top of page

Calorie Logging Excel VBA Project

  • Writer: Bradley Klawunder
    Bradley Klawunder
  • Oct 17, 2018
  • 2 min read


The purpose of this excel project is to give anyone who wants to lose weight, maintain weight, or track macro molecule intake a method of logging their progress in their fitness journey. Unlike myfitnesspal and other websites that serve this purpose, the user does not have to create an account, research the amount of calories they should intake every day, or research the amount of calories they have burned from exercising. The research is already completed using online calculators that provide the same function.


This excel project includes a calculator of how many calories the user should eat daily. The user inserts their weight, height, gender, and age. After this is completed, it spits out a number which is the amount of calories that can be consumed that day. If the user eats more calories than that number, they gain weight that day. If they user eats under that calorie count, they will lose weight that day.


The excel project also includes the amount of calories the user burns with a given activity. Currently, I have only included three typical activities: running, walking, and lifting weights. Running and walking are fairly accurate, however the lifting weights category is a very ballpark estimate. If the user is trying to lose weight, I would advise to not count those calories. Once the user enters the distance ran, walked or the time spent lifting, the number of calories will be displayed above it for that day.


The tracker also has a built-in macro molecule tracker. By scrolling down, the user can input the calorie deficit that they are targeting. With a few if-statements, the tracker calculates the grams of protein, carbohydrates, and fats that the user should shoot for to encourage muscle build.


After logging all of the calories for the entire week, the excel sheet calculates the pounds of fat that the user lost that week. The user can log this number into the report card area for every week completed.


Finally, I have assigned a macro to two buttons in the Excel file using VBA code. I have had requests from people currently using this excel file to lose weight that they did not want to see the number of calories they were at until the end of the week. The "Hide" button hides the numbers that the user is at so that they cannot look at their net total for the day. However, they can still input their numbers into each cell. The reveal button reveals these numbers upon request.


This is the first version of the project I have published. I am currently working on a food matrix wherein the user can click a button to input a food item with its nutritional data. After it is put in, a button will be created for adding all of the data for that food into the proper cells. This is an ongoing project and I will be posting updates accordingly.


Happy Wednesday!


Here is the excel file: https://www.mediafire.com/file/48iw41c1ab2bni6/caloriesmaintain.xlsm/file

Comments


© 2023 by The Mountain Man. Proudly created with Wix.com

bottom of page