Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Auto Fill Column with Date based on rows in other column

I have a spreadsheet that has 5 columns in it. The report varies in length
every day. I want Column E to prefill with todays date as many rows as in
column A, the header for this column is "ConfDate". This code is not
working, any help you can give me is appreciated. Thanks

ActiveCell.FormulaR1C1 = "ConfDate"
Columns("E:E").Select
Range("E:E").Activate
Selection.Style = "=TODAY()"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Fill Column with Date based on rows in other column


with
range([e1],cells(intersect(activesheet.usedrange,[a:a]).rows.count,5))
value=date
numberformat="dd/mm/yyyy"
end with
[e1].value="ConfDate"


Col


--
colofnature
------------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=548965

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Auto Fill Column with Date based on rows in other column

Thanks so much, this worked great!! I altered it a bit just to do the same
thing in column 4 to prefill "Gesa cc" and I now get an error. the error says
"compile Error: Expected End with"

Here is what I did, can you see what is wrong? Thanks a bunch

'Enters todays date into rows equal to as many rows as column A

With Range([e1], Cells(Intersect(ActiveSheet.UsedRange,
[a:a]).Rows.Count, 5))
.Value = Date
.NumberFormat = "dd/mm/yyyy"

End With

With Range([d1], Cells(Intersect(ActiveSheet.UsedRange,
[a:a]).Rows.Count, 4))
.Value = "Gesa CC"

End With

End Sub

"colofnature" wrote:


with
range([e1],cells(intersect(activesheet.usedrange,[a:a]).rows.count,5))
.value=date
.numberformat="dd/mm/yyyy"
end with
[e1].value="ConfDate"


Col


--
colofnature
------------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=548965


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto fill text columns based on rows Cecilia Excel Worksheet Functions 3 March 29th 10 10:51 PM
Auto-Fill Column based on data in each row Dave Excel Worksheet Functions 7 May 23rd 09 10:24 AM
Fill a column with the contents of another column based on a choic Sparky56 Excel Discussion (Misc queries) 1 March 31st 07 04:18 AM
Auto fill Column based on data in other columns SITCFanTN New Users to Excel 1 June 6th 06 09:04 PM
Fill a column in a worksheet from a formula worksheet based on the date NadiaR Excel Programming 4 March 15th 06 10:42 PM


All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"