Hello and thank you for any help you may be able to provide!

I'm new to VBA and I've tried several different ways to accomplish this using EXCEL functions but I would like to simplify my workbook by using VBA.

I have a workbook with 3 varying data sources and I need to match values to determine volumes and then calculate billing details. The data sources are on separate sheets but to the attached sample workbook has the data sources on all one sheet. I need to calculate the values in yellow by matching up the account number in the order of priority as listed below:

1) Account Number_Meter Number_Location Number (If found use this to search for volumes in column M)

2) Account Number_Any combination of Meter Number or Location Number (If found use this to search for volumes in column M)

3) If none of the variables (Account Number, Meter Number, Location Number) match then just use Account Number to search for volumes

Once matches are found then find volumes in column M and calculate values in yellow highlighted fields.

Thank you very much to anyone that can help me solve this.