current date & time entered automatically in cells in adjacent cells is entered

mb

Lifer
Jun 27, 2004
10,233
2
71
I'm starting a new work out routine, and I'd like to chart my weight using Excel.
Is there a way that I can make it so when I enter a value into a cell on colum B, it enters the current date into the adjacent cell in colum A, and not have that date change when I enter something else for the next day?

About as far as I got is it will update the cell next to a new input, but it changes all the other dates, too.

An example of what I'm trying to do is this:
Lets say today, I weigh 180, so I put 180 in B1, I want to have it automatically show 5/17/2005 in A1. Tomorrow if I put 179 in A2, I want to automatically have it show 5/18/2005 in A2 while leaving A1 as it was.

I know I could just not be lazy and type the date everytime, but I've been wondering how to do this for a while for other things, and haven't figured it out.
 

TSDible

Golden Member
Nov 4, 1999
1,697
0
76
Are you willing to use a VBA (macro) solution?

If so, it should be fairly simple. If not, I'm not sure.
 

TSDible

Golden Member
Nov 4, 1999
1,697
0
76
This will do the trick.

You will need to open the VBA Editor (Alt+F11) and put the following code in to your sheet where you want the function to work.

Basically, it looks for a change in column A. If there is a change, it will put a date and time stamp in the next column.

You will need to have macros enabled for it to work.

 

mb

Lifer
Jun 27, 2004
10,233
2
71
Originally posted by: TSDible
This will do the trick.

You will need to open the VBA Editor (Alt+F11) and put the following code in to your sheet where you want the function to work.

Basically, it looks for a change in column A. If there is a change, it will put a date and time stamp in the next column.

You will need to have macros enabled for it to work.

Thanks! That works like a charm!
 

TSDible

Golden Member
Nov 4, 1999
1,697
0
76
Originally posted by: supafly
Originally posted by: TSDible
This will do the trick.

You will need to open the VBA Editor (Alt+F11) and put the following code in to your sheet where you want the function to work.

Basically, it looks for a change in column A. If there is a change, it will put a date and time stamp in the next column.

You will need to have macros enabled for it to work.

Thanks! That works like a charm!

Glad to help.

VBA is fun. :)