+ Reply to Thread
Results 1 to 3 of 3

Auto Fill Column with Date based on rows in other column

  1. #1
    JOUIOUI
    Guest

    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. #2
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    with range([e1],cells(intersect(activesheet.usedrange,[a:a]).rows.count,5))
    .value=date
    .numberformat="dd/mm/yyyy"
    end with
    [e1].value="ConfDate"


    Col

  3. #3
    JOUIOUI
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1