![]() |
code for storing data
I need help on trying to store data from one worksheet and move it
over to another worksheet row. I have set up an logical table to tell what cell goes in what row for the worksheet but I do not know how to command it to store now. For example I want cell A1 in sheet 1 to go to row A in sheet summary. I am trying to make a database that would store 50 different items instead of having a worksheet for each item I want to fill out the form once for each item and move the data over to the summary sheet. Any help would be appreciated. Thanks! |
code for storing data
Start here Maggie
http://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Maggie" wrote in message oups.com... I need help on trying to store data from one worksheet and move it over to another worksheet row. I have set up an logical table to tell what cell goes in what row for the worksheet but I do not know how to command it to store now. For example I want cell A1 in sheet 1 to go to row A in sheet summary. I am trying to make a database that would store 50 different items instead of having a worksheet for each item I want to fill out the form once for each item and move the data over to the summary sheet. Any help would be appreciated. Thanks! |
code for storing data
On Mar 16, 11:56 am, "Ron de Bruin" wrote:
Start here Maggiehttp://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm "Maggie" wrote in ooglegroups.com... I need help on trying to store data from one worksheet and move it over to another worksheet row. I have set up an logical table to tell what cell goes in what row for the worksheet but I do not know how to command it to store now. For example I want cell A1 in sheet 1 to go to row A in sheet summary. I am trying to make a database that would store 50 different items instead of having a worksheet for each item I want to fill out the form once for each item and move the data over to the summary sheet. Any help would be appreciated. Thanks!- Hide quoted text - - Show quoted text - I tried to use the code that Ron provided but I still get an error about the Lr. I But what I am trying to do is store data into another worksheet in the same workbook. |
code for storing data
Copy the function also in the module Maggie
-- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Maggie" wrote in message ups.com... On Mar 16, 11:56 am, "Ron de Bruin" wrote: Start here Maggiehttp://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm "Maggie" wrote in ooglegroups.com... I need help on trying to store data from one worksheet and move it over to another worksheet row. I have set up an logical table to tell what cell goes in what row for the worksheet but I do not know how to command it to store now. For example I want cell A1 in sheet 1 to go to row A in sheet summary. I am trying to make a database that would store 50 different items instead of having a worksheet for each item I want to fill out the form once for each item and move the data over to the summary sheet. Any help would be appreciated. Thanks!- Hide quoted text - - Show quoted text - I tried to use the code that Ron provided but I still get an error about the Lr. I But what I am trying to do is store data into another worksheet in the same workbook. |
code for storing data
On Mar 20, 6:31 pm, "Ron de Bruin" wrote:
Copy the function also in the module Maggie -- Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm "Maggie" wrote in oglegroups.com... On Mar 16, 11:56 am, "Ron de Bruin" wrote: Start here Maggiehttp://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm "Maggie" wrote in ooglegroups.com... I need help on trying to store data from one worksheet and move it over to another worksheet row. I have set up an logical table to tell what cell goes in what row for the worksheet but I do not know how to command it to store now. For example I want cell A1 in sheet 1 to go to row A in sheet summary. I am trying to make a database that would store 50 different items instead of having a worksheet for each item I want to fill out the form once for each item and move the data over to the summary sheet. Any help would be appreciated. Thanks!- Hide quoted text - - Show quoted text - I tried to use the code that Ron provided but I still get an error about the Lr. I But what I am trying to do is store data into another worksheet in the same workbook.- Hide quoted text - - Show quoted text - I have the macro copied to both a module and sheet. Here is the code that I am working with if you could look over it and tell me why I am still receiving a error I would appreciate it. Sub copy_1() Dim sourceRange As Range Dim destrange As Range Dim Lr As Long Lr = LastRow(Sheets("Summary")) + 1 Set sourceRange = Sheets("HOEPAWorksheet").Range("C3:H74") Set destrange = Sheets("Summary").Range("A:BU" & Lr) sourceRange.Copy destrange End Sub Sub copy_1_Values_PasteSpecial() Dim sourceRange As Range Dim destrange As Range Dim Lr As Long Application.ScreenUpdating = False Lr = LastRow(Sheets("Summary")) + 1 Set sourceRange = Sheets("HOEPAWorksheet").Range("C3:H74") Set destrange = Sheets("Summary").Range("A:BU" & Lr) sourceRange.Copy destrange.PasteSpecial xlPasteValues, , False, False Application.CutCopyMode = False Application.ScreenUpdating = True End Sub Sub copy_1_Values_ValueProperty() Dim sourceRange As Range Dim destrange As Range Dim Lr As Long Lr = LastRow(Sheets("Summary")) + 1 Set sourceRange = Sheets("HOEPAWorksheet").Range("C3:H74") With sourceRange Set destrange = Sheets("Summary").Range("A:BU" & Lr). _ Resize(.Rows.Count, .Columns.Count) End With destrange.Value = sourceRange.Value End Sub |
code for storing data
All three macro do the copy only in a different way.
All macros use the LastRow function See my site Copy one macro and the function in a normal module(not a sheet module) and try again -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Maggie" wrote in message oups.com... On Mar 20, 6:31 pm, "Ron de Bruin" wrote: Copy the function also in the module Maggie -- Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm "Maggie" wrote in oglegroups.com... On Mar 16, 11:56 am, "Ron de Bruin" wrote: Start here Maggiehttp://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm "Maggie" wrote in ooglegroups.com... I need help on trying to store data from one worksheet and move it over to another worksheet row. I have set up an logical table to tell what cell goes in what row for the worksheet but I do not know how to command it to store now. For example I want cell A1 in sheet 1 to go to row A in sheet summary. I am trying to make a database that would store 50 different items instead of having a worksheet for each item I want to fill out the form once for each item and move the data over to the summary sheet. Any help would be appreciated. Thanks!- Hide quoted text - - Show quoted text - I tried to use the code that Ron provided but I still get an error about the Lr. I But what I am trying to do is store data into another worksheet in the same workbook.- Hide quoted text - - Show quoted text - I have the macro copied to both a module and sheet. Here is the code that I am working with if you could look over it and tell me why I am still receiving a error I would appreciate it. Sub copy_1() Dim sourceRange As Range Dim destrange As Range Dim Lr As Long Lr = LastRow(Sheets("Summary")) + 1 Set sourceRange = Sheets("HOEPAWorksheet").Range("C3:H74") Set destrange = Sheets("Summary").Range("A:BU" & Lr) sourceRange.Copy destrange End Sub Sub copy_1_Values_PasteSpecial() Dim sourceRange As Range Dim destrange As Range Dim Lr As Long Application.ScreenUpdating = False Lr = LastRow(Sheets("Summary")) + 1 Set sourceRange = Sheets("HOEPAWorksheet").Range("C3:H74") Set destrange = Sheets("Summary").Range("A:BU" & Lr) sourceRange.Copy destrange.PasteSpecial xlPasteValues, , False, False Application.CutCopyMode = False Application.ScreenUpdating = True End Sub Sub copy_1_Values_ValueProperty() Dim sourceRange As Range Dim destrange As Range Dim Lr As Long Lr = LastRow(Sheets("Summary")) + 1 Set sourceRange = Sheets("HOEPAWorksheet").Range("C3:H74") With sourceRange Set destrange = Sheets("Summary").Range("A:BU" & Lr). _ Resize(.Rows.Count, .Columns.Count) End With destrange.Value = sourceRange.Value End Sub |
All times are GMT +1. The time now is 10:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com