Formula to calculate the difference between two numbers based on a month in another column

I am unsure if it is possible to do what I want, but I wanted to ask. I have attached a copy of my grid. I want a formula to calculate the difference between the largest and smallest numbers for each well for each month. For example, for well #2 in month one, find the largest number (58650300) and subtract the smallest number (58526600) to give me the total produced in the month. Then, repeat this for each well and each month. I need this formula to be used year after year, so I need it based on month and not date specific.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!