1. Log in now to remove adverts - no adverts at all to registered members!

Off Topic : Microsoft Excel

Discussion in 'Liverpool' started by Mark Blow, Feb 2, 2025.

  1. Mark Blow

    Mark Blow Well-Known Member

    Joined:
    Jun 5, 2011
    Messages:
    3,503
    Likes Received:
    2,204
    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?
     
    #1
  2. Zanjinho

    Zanjinho Boom!
    Forum Moderator

    Joined:
    Sep 10, 2014
    Messages:
    47,701
    Likes Received:
    29,699
    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
     
    #2
    InBiscanWeTrust likes this.
  3. InBiscanWeTrust

    InBiscanWeTrust Rome, London, Paris, Rome, Istanbul, Madrid
    Forum Moderator

    Joined:
    May 22, 2011
    Messages:
    72,289
    Likes Received:
    27,246
    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
     
    #3
  4. Mark Blow

    Mark Blow Well-Known Member

    Joined:
    Jun 5, 2011
    Messages:
    3,503
    Likes Received:
    2,204
    here is a photo of the mileage log. I have no idea how to do formula.
    Image.jpeg
     
    #4
  5. InBiscanWeTrust

    InBiscanWeTrust Rome, London, Paris, Rome, Istanbul, Madrid
    Forum Moderator

    Joined:
    May 22, 2011
    Messages:
    72,289
    Likes Received:
    27,246
    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.
     
    #5
    Zanjinho likes this.
  6. InBiscanWeTrust

    InBiscanWeTrust Rome, London, Paris, Rome, Istanbul, Madrid
    Forum Moderator

    Joined:
    May 22, 2011
    Messages:
    72,289
    Likes Received:
    27,246
    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.
     
    #6
  7. Solid Air 2

    Solid Air 2 Well-Known Member

    Joined:
    Aug 3, 2015
    Messages:
    31,955
    Likes Received:
    28,422
    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
     
    #7

Share This Page