Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Excel Formula Question ?


  • Please log in to reply

#1
moondog830

moondog830

    Member

  • Member
  • PipPipPip
  • 804 posts

I am doing my taxes and I would prefer to do my mileage using Excel rather than hand write it all ... 

 

Is there a way to create a formula that will allow me to type in the location in one column and put the mileage in another column and then add 'that' column up for a total?

 

Any help is appreciated ... it's been 10 years since I seriously did anything in Excel ... so i'm relearning 

 

dog


  • 0

Advertisements


#2
admin

admin

    Founder Geek

  • Community Leader
  • 24,639 posts

If column A is location, and column B is mileage. in column C you'd enter =A2+A3

 

Another option would be using the SUM() function, in column C enter =SUM(A2:A3) with SUM it's easier to enter a large range, like A2:A10 for all columns between 2 and 10.


  • 0

#3
moondog830

moondog830

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 804 posts

maybe I'm not explaining my question right ... cuz your answer doesn't sound right for what I want ... although it's close (could just be my old butt)

 

I want to do something that would have basically 2 columns ... A and B ... in A if I type the name of one of the cities I travel to, it would automatically put the mileage to and from my house to there in column B ... (this would require me only to enter the name of the city in column A and the rest would take care of itself) 

 

I'm thinking, I'm talking about something that would require a database and that this is something also, that I can't get done in Excel ... or ... am I not understanding what you're saying

 

dog

 

P.S. thanks for responding so fast.


  • 0

#4
admin

admin

    Founder Geek

  • Community Leader
  • 24,639 posts

You could probably build an application that would do that using the Google Maps API, but you're correct it's outside the scope of Excel, or myself. :)

 

The exception would be if you always travelled between the same cities. Then you could build some kind of drop-down list referencing the distance stored in another cell.


  • 0

#5
moondog830

moondog830

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 804 posts

could you point  me to  a tutorial or something that would help  me do  the drop down menu for this? I would appreciate the help 


  • 0

#6
moondog830

moondog830

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 804 posts

I actually DO travel to the same cities thoughout the year ... I visit the libraries to do research ... so what would the best way to get this done  be?


  • 0

#7
johan9

johan9

    New Member

  • Member
  • Pip
  • 1 posts

hi

I'm thinking, I'm talking about something that would require a database and that this is something also, that I can't get done in Excel ... or ... am I not understanding what you're saying


  • 0

#8
cottontop

cottontop

    New Member

  • Member
  • Pip
  • 3 posts

A flatfile is required to solve this.  You would simply create two columns of data titling one column "cityname" and the other "Mileage"

Example:

 

cityname        Mileage

Atlanta            200

Charlotte         700

Boston            1200

 

Populate this with all the cities you will visit.  Do not change the city name once it's in place.  You can modify the mileage if needed, but once changed, all the references to it will change!

Make sure you sort both the cityname and mileage by the cityname in ascending order.

 

in a separate sheet, you will type in the cityname in one cell and in another cell you will use a "vlookup" formula.  Reference the flat file (cityname info) you have the stored data in.  You have to make sure you type in the city name exactly as it is in the flatfile.  

Example

 

City          Milage

Atlanta     =vlookup([city], [flatfile],1,) 

 

which will return:

 

City         Mileage

Atlanta    200


  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP