Any excel genius’s about I’m trying to do a mileage log. I have 2 columns for either a single journey or return journey I have a separate ox for total mileage recorded how can I create a formula to that the totals for the single and returnn journeys get added up automatically and appear in the total mileage recorded?
Make it three columns; distance in one, single or return column (so one or two) and then the third column (add a formula the times the first and second column) to give the total. Just have to add the total column up then
Do you need to record both separately? If so then yeah 4 columns. 1 showing date. 2 showing mileage for a single journey then 3rd column that has either a 1 or 2 in it for single or return. Then do a 4th for your total with sum of column 2 cell * column 3 cell. that will give you a total for that day id you then highlight everything and do ctrl L will put it into a table. then I’d create a row at the bottom and make sure the total in Column 4 is just a total of all the rows above. that way you’ll have a total at the bottom always. when you need to add a new line just do insert above the totals line and add it in there and the total should always calculate. Key thing is doing the ctrl L to put everything into a table as that makes sure all the formulas continue to return
add another column in H for total mileage then in that column do =sum(f46+g46) that will auto add them for you. You can then copy that formula down into next rows. ideally I’d get rid of the first few rows - make the date purpose from etc the top row in line 1. Then make it a table (hold ctrl and press L) and it’ll automatically mean any rows added to the bottom, pick up the formula.
Just to add not sure why rows go from row 3 to 46. Not sure if there’s stuff between that? If not then obviously do the formula for row 4 not row 46. Your row 1 and 2 with the big headings and green bits will make it awkward for filtering hence why I’d suggest deleting those and date / purpose / from etc all on row 1.
unless i missing something just total up both columns and then just select where you want the combined total and the formula will be the 2 cells references added together