creating database help please!

D

deemo85

Hi!

I would like to create an entry form, where the user inputs data into cells
in a column format, lets say from F5 to F8 in sheet1, and then these get
copied to sheet2 into a row format from lets say A1 to D1 respectively. So
where F5 gets copied to A1 then F6 to B1 etc etc. And then the next time I
enter data in sheet1 and run the macro I want the data to fill the next row
in sheet2, for example, from F5 to A2, F6 to B2 etc etc

THANK YOU!
 
P

Per Jessen

Hi

Try this:

Sub CopyData()
Dim CopyRng As Range
Dim DestRng As Range

Set CopyRng = Range("F5:F8")
With Worksheets("Sheet2")
If .Range("A1") <> "" Then
Set DestRng = .Range("A1").End(xlDown).Offset(1, 0)
Else
Set DestRng = .Range("A1")
End If
End With
CopyRng.Copy DestRng
End Sub

Regards,
Per
 
D

Don Guillett

try this to copy f8:f8 transposed to the next availalble row
Sub transposecolumntorows()
dim nar as long
with sheets("sheet2")
nar = .Cells(Rows.Count, 1).End(xlUp).Row + 1
sheets("sheet1").range("f5:f8").copy
..Cells(nar, 1).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
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