View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default copy a value across a row but into every nth cell

The best way is to setup some shortcut keys to move around the worksheet.

Sub copyright()

ActiveCell.Copy
ActiveCell.Offset(rowoffset:=0,columnofffset:= 12).Activate
End Sub

The above macro copies the activecell and then moves right 12 cells. You
can assign the macro a shortcut key by going on worksheet to Tools Menu Macro
- Options. Then enter a letter in the shortcut box.

The macro above could be modified to also do the paste.

You should also learn other standard shortcut keys available by searching in
the Worksheet help for "Shortcut". For example Cntl right arrow gets you to
the first column.

"MickinOz" wrote:

Say I have a table that has a variable (say$50) in cell 1 and is 12 months
wide (i.e. 13 cells across) I want to copy the variable into every nth cell
(where n is also a variable)
In this way I can say that certain expenses occur every n months.
Any suggestions greatly appreciated.
Mike