Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Excel Formula Question ?


  • Please log in to reply

#1
moondog830

moondog830

    Member

  • Member
  • PipPipPip
  • 598 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

  • Administrator
  • 24,504 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
  • 598 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

  • Administrator
  • 24,504 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
  • 598 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
  • 598 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