Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This macro should do the trick for you.
To put the macro into your workbook: open the workbook, press [Alt]+[F11] and then choose Insert -- Module and copy and paste the code below into the module and close the VB Editor. You may want to attach the macro to a button or shape for easier use, and there are several sites that will tell you how to do that, as: http://www.ozgrid.com/Excel/assign-macros.htm http://www.mrexcel.com/tip068.shtml Sub CopyAndTranspose() Dim destWS As Worksheet Dim destRange As Range Dim copyRange As Range Set copyRange = Sheets("Sheet1").Range("F5:F8") Set destWS = Sheets("Sheet2") Set destRange = destWS.Range("A" & Rows.Count) _ .End(xlUp) If Not IsEmpty(destRange) Then Set destRange = destRange.Offset(1, 0) End If copyRange.Copy destRange.PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, SkipBlanks:=False, Transpose:=True Application.CutCopyMode = False End Sub "deemo85" wrote: 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! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
THANK YOU SO MUCH!!!! IT IS PERFECT!
"JLatham" wrote: This macro should do the trick for you. To put the macro into your workbook: open the workbook, press [Alt]+[F11] and then choose Insert -- Module and copy and paste the code below into the module and close the VB Editor. You may want to attach the macro to a button or shape for easier use, and there are several sites that will tell you how to do that, as: http://www.ozgrid.com/Excel/assign-macros.htm http://www.mrexcel.com/tip068.shtml Sub CopyAndTranspose() Dim destWS As Worksheet Dim destRange As Range Dim copyRange As Range Set copyRange = Sheets("Sheet1").Range("F5:F8") Set destWS = Sheets("Sheet2") Set destRange = destWS.Range("A" & Rows.Count) _ .End(xlUp) If Not IsEmpty(destRange) Then Set destRange = destRange.Offset(1, 0) End If copyRange.Copy destRange.PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, SkipBlanks:=False, Transpose:=True Application.CutCopyMode = False End Sub "deemo85" wrote: 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! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Glad I could help.
"deemo85" wrote: THANK YOU SO MUCH!!!! IT IS PERFECT! "JLatham" wrote: This macro should do the trick for you. To put the macro into your workbook: open the workbook, press [Alt]+[F11] and then choose Insert -- Module and copy and paste the code below into the module and close the VB Editor. You may want to attach the macro to a button or shape for easier use, and there are several sites that will tell you how to do that, as: http://www.ozgrid.com/Excel/assign-macros.htm http://www.mrexcel.com/tip068.shtml Sub CopyAndTranspose() Dim destWS As Worksheet Dim destRange As Range Dim copyRange As Range Set copyRange = Sheets("Sheet1").Range("F5:F8") Set destWS = Sheets("Sheet2") Set destRange = destWS.Range("A" & Rows.Count) _ .End(xlUp) If Not IsEmpty(destRange) Then Set destRange = destRange.Offset(1, 0) End If copyRange.Copy destRange.PasteSpecial Paste:=xlPasteValues, _ Operation:=xlNone, SkipBlanks:=False, Transpose:=True Application.CutCopyMode = False End Sub "deemo85" wrote: 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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating shortcuts for a database between two pages | Excel Discussion (Misc queries) | |||
Creating a Database in Excel | New Users to Excel | |||
Creating worksheets from a database | Excel Discussion (Misc queries) | |||
Help needed on creating Excel database | Excel Discussion (Misc queries) | |||
Creating A Search Database..Need Help | Excel Discussion (Misc queries) |