A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

write macro col A date Col B gas col C dollars



 
 
Thread Tools Display Modes
  #1  
Old December 30th, 2005, 07:46 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default write macro col A date Col B gas col C dollars

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
  #2  
Old December 30th, 2005, 08:28 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default write macro col A date Col B gas col C dollars

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.

"Macro Help" wrote in message
...
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



  #3  
Old December 30th, 2005, 08:44 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default write macro col A date Col B gas col C dollars


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




"Macro Help" wrote:

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook today should show tasks based on Start Date, not due date Rose General Discussion 10 October 9th, 2005 03:14 AM
RECORDED MACRO PASTE'S DATE DIFFERENTLY TO MANUAL PASTE Pauldecan Worksheet Functions 0 June 23rd, 2005 05:45 PM
Query for 'confirmation' rogge Running & Setting Up Queries 8 April 19th, 2005 03:26 PM
Aggregating Date Data into Weeks and Quarters Roger Running & Setting Up Queries 3 July 11th, 2004 05:56 PM
Does date fall between two ranges? MR Worksheet Functions 4 January 14th, 2004 04:08 PM


All times are GMT +1. The time now is 05:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.