excel

T

ttlet

Is there a way to fill a column from a different sheet and the next day fill
the next column over from the same sheet as that sheet is updated by a data
base daliy. I want to keep the information in the first column and continue
to move to the next column each day.
 
D

Dom_Ciccone

To do this you will need to create a macro. The code you need (bar any
tweaking to fit your purpose) is:

Sub placecols()

mycolnum = Sheets("Sheet1").Range("A1").End(xlToRight).Column + 1
Sheets("Sheet2").Columns("A").EntireColumn.Copy _
Sheets("Sheet1").Cells(1, mycolnum)

End Sub

Place this in a Module attached to the workbook. Each day, update the
information in the second sheet from the database and then run this macro.

DC
 
D

Don Guillett

where sheet19 is the destination and sheet20 is the constant source and col
D (4)
Sub copycolumn()
With Sheets("sheet19")
lc = .Cells(1, Columns.Count).End(xlToLeft).Column + 1
Sheets("sheet20").Columns(4).Copy .Columns(lc)
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top