Wow, had this all typed up so well, then tried to add a table to it but it got goofed up and lost it all.... Oh well, so I try again!
Basic outlay/configuration:
I have a Excel 2013 workbook with a worksheet for each month that tracks all of a drivers activities, one of which is Fuel. The monthly worksheets contain the following columns needed to autofill the Fuel worksheet A date, B function (activity), E state, F Odometer, J Fuel (quantity). The Workbook contains a Fuel worksheet that provides Fuel usage information of each Fuel instance, monthly, and annually. The Fuel worksheet has the following columns A date, B state, C odometer, D Quantity, E calculates the MPG, and F comments for driver comments. There are many activities in the function column of the monthly worksheet and an undetermined number of Fuel instances, >0 but < 31; we have 30 rows for instances in each month of the Fuel Worksheet, more than enough. I would like the Fuel Worksheet to auto-populate itself with the data whenever a driver enters Fuel in the monthly worksheet, reducing the likelihood that a fuel entry is skipped or data entered incorrectly.
My approach/thoughts/attempt:
I either need a formula to grab the data of each instance for the entire Fuel row population in 1 formula, Or get it in combination 1 cell at a time. Simple is best, usually hardest to achieve because of overthinking! I think that CountIf may work best =COUNTIF(JAN!B2:B125,"Fuel", OK so far good start. We count the instances, but I need the first instance to retrieve data from JAN!A(n1), E(n1), F(n1), J(n1) and place them in the cells of the Fuel worksheet row2. The trick is then having the count increment for each consecutive instance, row 3 gets (n2), Row 4 gets (n3).... So i'm thinking that the formula in row 2 will be the working formula, and then in row2 it will be the same but do I put a +1 at the end to make it the second instance? Or am I going about this all wrong? I really need some assistance with the syntax as it relates to the usage. Am I on the right track for this?
Here's an example of the monthly worksheet:
<colgroup><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
And here is the corresponding portion of the Fuel worksheet:
<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>
Obviously my columns are not lined up like I'd like but you can see essentially what is happening. Currently I manually enter the data and the MPG is autocalculated.
Thank You in advance for any help!
Basic outlay/configuration:
I have a Excel 2013 workbook with a worksheet for each month that tracks all of a drivers activities, one of which is Fuel. The monthly worksheets contain the following columns needed to autofill the Fuel worksheet A date, B function (activity), E state, F Odometer, J Fuel (quantity). The Workbook contains a Fuel worksheet that provides Fuel usage information of each Fuel instance, monthly, and annually. The Fuel worksheet has the following columns A date, B state, C odometer, D Quantity, E calculates the MPG, and F comments for driver comments. There are many activities in the function column of the monthly worksheet and an undetermined number of Fuel instances, >0 but < 31; we have 30 rows for instances in each month of the Fuel Worksheet, more than enough. I would like the Fuel Worksheet to auto-populate itself with the data whenever a driver enters Fuel in the monthly worksheet, reducing the likelihood that a fuel entry is skipped or data entered incorrectly.
My approach/thoughts/attempt:
I either need a formula to grab the data of each instance for the entire Fuel row population in 1 formula, Or get it in combination 1 cell at a time. Simple is best, usually hardest to achieve because of overthinking! I think that CountIf may work best =COUNTIF(JAN!B2:B125,"Fuel", OK so far good start. We count the instances, but I need the first instance to retrieve data from JAN!A(n1), E(n1), F(n1), J(n1) and place them in the cells of the Fuel worksheet row2. The trick is then having the count increment for each consecutive instance, row 3 gets (n2), Row 4 gets (n3).... So i'm thinking that the formula in row 2 will be the working formula, and then in row2 it will be the same but do I put a +1 at the end to make it the second instance? Or am I going about this all wrong? I really need some assistance with the syntax as it relates to the usage. Am I on the right track for this?
Here's an example of the monthly worksheet:
Date | Function | Location | City | ST | odometer | miles | Driver | expense | fuel |
1/6/2015 | Rest | Home | Fayetteville | TN | 803,536 | 119 | |||
1/7/2015 | Load | Aladdin | Hendersonville | TN | 803,655 | 107 | |||
1/7/2015 | Stateline | I-65 | AL | 803,762 | 133 | ||||
1/7/2015 | Fuel | Petro | McCalla | AL | 803,895 | 103 | $300.00 | 80.043 | |
1/7/2015 | Stateline | I-59 | MS | 803,998 | 176 | ||||
1/7/2015 | Rest | Walmart | Gulfport | MS | 804,174 | 5 | |||
1/8/2015 | Unload | Gulfport | MS | 804,179 | 17 | ||||
1/8/2015 | Trailer Repair | GulfCoastRepair | PassChristian | MS | 804,196 | 55 | |||
1/8/2015 | Stateline | I-10 | AL | 804,251 | 5 | ||||
1/8/2015 | Rest | TA | GrandBay | AL | 804,256 | 317 | |||
1/9/2015 | Fuel | Petro | DodgeCity | AL | 804,573 | 86 | $300.00 | 123.035 | |
1/9/2015 | Stateline | US-231 | TN | 804,659 | 7 |
<colgroup><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
And here is the corresponding portion of the Fuel worksheet:
Date | State | Odometer | Quantity | MPG | Comments |
12/16/2014 | 803,396 | CARRY FORWARD | |||
1/7/2015 | AL | 803,895 | 80.043 | 6.23 | |
1/9/2015 | AL | 804,573 | 123.035 | 5.51 | idling |
<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>
Obviously my columns are not lined up like I'd like but you can see essentially what is happening. Currently I manually enter the data and the MPG is autocalculated.
Thank You in advance for any help!