ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding date to a column in Excel (https://www.excelbanter.com/excel-programming/412858-adding-date-column-excel.html)

mikerobe

Adding date to a column in Excel
 
Hi
I have recently asked a similar question but having thought about it
there may be an easier solution to what i want. I have a worksheet
where rows of data are added daily. The data goes to column H
inclusive. I would like to add todays date to column "I" when data is
added. So I was guessing it might be possible to create a macro to add
that days date based on the fact that if Column "I" is blank down as
far as there is data in column H. This would then build up a new
column "Date data added".

Can anyone help me with code for this?

Much appreciated

Eddie

Don Guillett

Adding date to a column in Excel
 
one way. Didn't test
lri=cells(rows.count,"i").end(xlup).row+1
lrh=cells(rows.count,"h").end(xlup).row
range(cells(lri,"i"),cells(lrh,"i")=date

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mikerobe" wrote in message
...
Hi
I have recently asked a similar question but having thought about it
there may be an easier solution to what i want. I have a worksheet
where rows of data are added daily. The data goes to column H
inclusive. I would like to add todays date to column "I" when data is
added. So I was guessing it might be possible to create a macro to add
that days date based on the fact that if Column "I" is blank down as
far as there is data in column H. This would then build up a new
column "Date data added".

Can anyone help me with code for this?

Much appreciated

Eddie



Sgwapt

Adding date to a column in Excel
 
This is what I use

Add the field name "AddDate" to column I
The update code if using to this
ActiveCell.Offset(0,1).value = Date

ActiveCell = "H2"
0= Row
1 = Column I

If this is the direction you wanted then I believe it's becuase you want to
use filters to see what is being added to data sheet.


My data sheets have 2 fields as the last columns
AddDate
FixDate


I hope this helps.

--
George G


"mikerobe" wrote:

Hi
I have recently asked a similar question but having thought about it
there may be an easier solution to what i want. I have a worksheet
where rows of data are added daily. The data goes to column H
inclusive. I would like to add todays date to column "I" when data is
added. So I was guessing it might be possible to create a macro to add
that days date based on the fact that if Column "I" is blank down as
far as there is data in column H. This would then build up a new
column "Date data added".

Can anyone help me with code for this?

Much appreciated

Eddie


Sgwapt

Adding date to a column in Excel
 
Leave it up to the guru's
Way to go Don

LOL
--
George G


"Don Guillett" wrote:

one way. Didn't test
lri=cells(rows.count,"i").end(xlup).row+1
lrh=cells(rows.count,"h").end(xlup).row
range(cells(lri,"i"),cells(lrh,"i")=date

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mikerobe" wrote in message
...
Hi
I have recently asked a similar question but having thought about it
there may be an easier solution to what i want. I have a worksheet
where rows of data are added daily. The data goes to column H
inclusive. I would like to add todays date to column "I" when data is
added. So I was guessing it might be possible to create a macro to add
that days date based on the fact that if Column "I" is blank down as
far as there is data in column H. This would then build up a new
column "Date data added".

Can anyone help me with code for this?

Much appreciated

Eddie




mikerobe

Adding date to a column in Excel
 
On Jun 20, 1:07*am, Sgwapt wrote:
Leave it up to the guru's
Way to go Don

LOL
--
George G



"Don Guillett" wrote:
one way. Didn't test
lri=cells(rows.count,"i").end(xlup).row+1
lrh=cells(rows.count,"h").end(xlup).row
range(cells(lri,"i"),cells(lrh,"i")=date


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mikerobe" wrote in message
....
Hi
I have recently asked a similar question but having thought about it
there may be an easier solution to what i want. I have a worksheet
where rows of data are added daily. The data goes to column H
inclusive. I would like to add todays date to column "I" when data is
added. So I was guessing it might be possible to create a macro to add
that days date based on the fact that if Column "I" is blank down as
far as there is data in column H. This would then build up a new
column "Date data added".


Can anyone help me with code for this?


Much appreciated


Eddie- Hide quoted text -


- Show quoted text -


Thanks Don - Thats exactly what I wanted works perfect and only 3
lines of code! amazing. Also thanks George for your suggestion.

Don Guillett

Adding date to a column in Excel
 

Glad to help
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Sgwapt" wrote in message
...
Leave it up to the guru's
Way to go Don

LOL
--
George G


"Don Guillett" wrote:

one way. Didn't test
lri=cells(rows.count,"i").end(xlup).row+1
lrh=cells(rows.count,"h").end(xlup).row
range(cells(lri,"i"),cells(lrh,"i")=date

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mikerobe" wrote in message
...
Hi
I have recently asked a similar question but having thought about it
there may be an easier solution to what i want. I have a worksheet
where rows of data are added daily. The data goes to column H
inclusive. I would like to add todays date to column "I" when data is
added. So I was guessing it might be possible to create a macro to add
that days date based on the fact that if Column "I" is blank down as
far as there is data in column H. This would then build up a new
column "Date data added".

Can anyone help me with code for this?

Much appreciated

Eddie






All times are GMT +1. The time now is 01:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com