Using AutoFilter with multiple Criteria & two different FIELD target ranges.
The application is for collecting equipment hours and fuel usage and posting them into a data table on a different sheet, same workbook. I have a table where the user can input “ENDING METER” readings and Fuel usage for a piece of heavy equipment. Most of the time the user will enter Hours and gallons. Sometimes in the real-world, the equipment does not get fueled up on a day that it has “Hours” logged to it. So, on a given day, you may enter gallons of fuel but no hours.
If the user enters Fuel and Hours for the same piece of equipment (same row), my VBA works and data gets moved to the table. If the user enters Hours and no fuel, that VBA scenario works as well. If the user enters FUEL USAGE only and no hours for that equipment (same ROW) along with other equipment hours, the stand-alone fuel doesn't get recorded.
I cannot figure a way to deal with two FIELDS within the AutoFilter programmatically, or maybe you have a much better way to approach what I am trying to accomplish.
I have tried to clean up the attached workbook as much as possible.
Knightflier
Bookmarks