Copy Issue VBA

Posted on 2012-08-20
Last Modified: 2012-08-21
Hello All,

I need a vba to do the following. If you have any ideas, please reply.
There is a sheet (1) which has a table. Column f will have customer names. What I want to accomplish:
1.      The shipment date column will be equal to the range “Ship Date”
2.      Date Processed column will have today’s date
3.      FileName column will have this file’s name in  the column
These three values will be the same for the three columns till the last line.

Thank you
Question by:Rayne
    LVL 10

    Accepted Solution

    Hi Rayne,

    I think this will get you in the right direction...
    Public Sub fillDataTable()
        Dim dateShipped As Date
        Dim dateProcessed As Date
        Dim processedInFile As String
        dateShipped = Range("d6").Value
        dateProcessed = Date
        processedInFile = ActiveWorkbook.FullName
        'fill date shipment column
        With Range("i10").Select
            Range(Selection, Selection.End(xlDown)).Value = dateShipped
        End With
        'fill date processed column
        With Range("j10").Select
            Range(Selection, Selection.End(xlDown)).Value = dateProcessed
        End With
        'fill filename column
        With Range("k10").Select
            Range(Selection, Selection.End(xlDown)).Value = processedInFile
        End With
    End Sub

    Open in new window


    Author Comment

    Perfect Aebea,

    thats works great, thank you :)

    Author Comment

    thank you  Aebea again, you rock

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
    In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
    The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now