Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / December 2005

Tip: Looking for answers? Try searching our database.

write macro col A date Col B gas col C dollars

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Macro Help - 30 Dec 2005 19:46 GMT
I am trying to write a macro where I put the date in col A, go to col B and
put in the amount of gas, go to col C and put in price of gas, go to col D
put in mileage go to next col E an have it calculate miles per gallon then
ask if another entry is to be made.  Then have it go to the next blank line
when the macro is run again.  I am having problems as I do not understand all
of the terms in Excel, Lotus was much easier.  If anyone can help I would
appreciate it.

Bob
Barb Reinhardt - 30 Dec 2005 20:28 GMT
Forgive the silly question, but why do you need a macro?

If you want today's date, enter CTRL ;
The other entries are just entries.

To calculate the Miles per gallon (using Miles in E1 and Gallons in C1)
enter =E1/C1

I've been tracking my mileage and have also included the name of the gas
station.  I'm seeing that I get better mileage from some stations than
others (although haven't done a full statistical analysis of it).   Who
knows if it's because of the fuel or if the tank is more full at some than
at others.   My MPG also appears be more stable if I fill the tank with
approximately the same amount of gas each time.   I've had very low MPG when
I fill the tank and it's still half full.

>I am trying to write a macro where I put the date in col A, go to col B and
> put in the amount of gas, go to col C and put in price of gas, go to col D
[quoted text clipped - 7 lines]
>
> Bob
Jacob_F_Roecker - 30 Dec 2005 20:44 GMT
I know you said you're looking for a Macro but I'm a fan of formulas and
would like to offer the following

Column E=Miles/Gal
version 1  =((D2-D1)/B2)
version 2  =(G2/B2)

Column F= Cost/Gal
=((C2/B2))

Column G=Distance Traveled
=D2-D1

I know it's probably too simple minded.  But I like things that just work
and this works.

Hope this helps

jacob@roeckerfam.com

> I am trying to write a macro where I put the date in col A, go to col B and
> put in the amount of gas, go to col C and put in price of gas, go to col D
[quoted text clipped - 5 lines]
>
> Bob
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.