Put the date in the first row of a table

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,341
Office Version
  1. 365
Platform
  1. Windows
I have a table where I want to put the date (which has been converted to Text) into the first row of my table.

This code ALMOST works. Its putting the value in the table header and not the first row.

(and then I am trying to copy that down to the last row)

Code:
Sub Macro6()

ActiveSheet.ListObjects("IHS_Markit").ListColumns("Version").Range(1, 1).Value = Format(Now, "yy.mm.dd")

   ActiveSheet.ListObjects("IHS_Markit").ListColumns("Version").Range(1, 1).Select
    Selection.End(xlDown).Select
    Selection.Copy
    Range(Selection, Selection.End(xlDown)).Select
    ActiveSheet.Paste
        Application.CutCopyMode = False
       
End Sub

[code/]
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Try
VBA Code:
ActiveSheet.ListObjects("IHS_Markit").ListColumns("Version").Range(2).Value = Format(Now, "yy.mm.dd")
Although I'm not sure what you are trying to do with the rest of the code.
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,227
Messages
6,123,745
Members
449,116
Latest member
alexlomt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top