Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In VBA EXcel, I have a report that will list data. The number of records will
be different everytime I run the report. I want to add a column at the end of the report to show today's date. How do I do this to correspond with the number of records? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
supposing, that last column with data is "D", you can use: dim rng as range rng=range("D" & application.Rows.Count).End(xlUp).Offset(0,1) rng is the range in column just next to D, in the last used row. Regards, Ivan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Then how do i get it to do the function?
"Ivan Raiminius" wrote: Hi, supposing, that last column with data is "D", you can use: dim rng as range rng=range("D" & application.Rows.Count).End(xlUp).Offset(0,1) rng is the range in column just next to D, in the last used row. Regards, Ivan |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this idea. Change activecell.row to suit your code
Sub dateinlastcol() Cells(ActiveCell.Row, Columns.Count) _ ..End(xlToLeft).Offset(, 1) = Date End Sub -- Don Guillett SalesAid Software "marthasanchez" wrote in message ... In VBA EXcel, I have a report that will list data. The number of records will be different everytime I run the report. I want to add a column at the end of the report to show today's date. How do I do this to correspond with the number of records? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I did exactly the formula below and this mehtod did noe wor?
"Don Guillett" wrote: try this idea. Change activecell.row to suit your code Sub dateinlastcol() Cells(ActiveCell.Row, Columns.Count) _ ..End(xlToLeft).Offset(, 1) = Date End Sub -- Don Guillett SalesAid Software "marthasanchez" wrote in message ... In VBA EXcel, I have a report that will list data. The number of records will be different everytime I run the report. I want to add a column at the end of the report to show today's date. How do I do this to correspond with the number of records? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Martha,
I may be over simplifying here, but couldn't you just put &[date] in the footer rather than part of your VBA routine. Just a thought Martin |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to add it as a column in a date format so that I may calculate the
dates on the report "MartinW" wrote: Hi Martha, I may be over simplifying here, but couldn't you just put &[date] in the footer rather than part of your VBA routine. Just a thought Martin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date Incorporation Frustration (sorry for the re-post) | Excel Worksheet Functions | |||
Re-post: Code to make sheet very hidden based on date | Excel Discussion (Misc queries) | |||
3 months prior and 3 months post a date | Excel Worksheet Functions | |||
This is my Third Post Please Help !!!!!! | Excel Discussion (Misc queries) | |||
Should I generally request "post a poll" when I post a new thread? | Excel Discussion (Misc queries) |