• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 393
  • Last Modified:

Copy Issue VBA

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
CopyDownTrick.xlsx
0
Rayne
Asked:
Rayne
  • 2
1 Solution
 
Anthony BerenguelCommented:
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

0
 
RayneAuthor Commented:
Perfect Aebea,

thats works great, thank you :)
0
 
RayneAuthor Commented:
thank you  Aebea again, you rock
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now