Thread: visual basic
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default visual basic

One way:

ActiveCell.Value = "Matthew"
ActiveCell.Offset(1, 0).Value = "Mike"
ActiveCell.Offset(2, 0).Value = "David"


another:

ActiveCell.Resize(3, 1).Value = _
Application.Transpose(Array("Matthew", "Mike", "David"))


In article ,
Matthew wrote:

Here is a sample of the macro


'
ActiveCell.FormulaR1C1 = "Matthew"
Range("R2").Select
ActiveCell.FormulaR1C1 = "Mike"
Range("R3").Select
ActiveCell.FormulaR1C1 = "David"
Range("R4").Select
End Sub

"JE McGimpsey" wrote:

It would be helpful to post the macro (or a portion of it if it's long)
in your message. Trying to guess what you recorded is difficult...


In article ,
Matthew wrote:

Hi can anyone help,

I want to set up a macro that will give me a list of names on a sheet eg.
Matthew
Mike
David
Etc
But when I ran the macro it remembers the cell I have originally typed
into
and I want it to be able run from where i place my mouse eg. It could
Start
in cell C1 or D3 etc. Does anyone know the script i would need?