View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Macro - a way of recording the date

Hi Sarah.........
Excel knows what today's date is. If you prompt the user to input a date,
they may input an erroneous one. This macro should do as you want, provided
there is not any other date in the range B4:b11

Sub CopyRangeAddDate()
Range("AS4:AS11").Select
Selection.Copy
Range("As4").Select
Selection.End(xlToLeft).Select
Selection.Offset(0, 1).Select
ActiveSheet.Paste
Selection.Offset(-1, 0).Select
ActiveCell.Value = Date
End Sub


Vaya con Dios,
Chuck, CABGx3


"Sarah (OGI)" wrote:

Firstly, I need a macro that will copy and paste data from cells AS4:AS11into
column B in another worksheet. However, each time the macro will be run, I
need the results to appear in the next available column, i.e. column C, then
column D, etc.

Secondly, is there any way, before the macro is run, to prompt the user with
an input field whereby they must enter the current date. I would then like
that date value to be input into the relevant column header, to indicate when
that macro was run. The macro can then continue as normal.

Any ideas?