Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default 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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default 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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
storing code in Add-in mike allen[_2_] Excel Programming 4 January 28th 07 08:44 PM
storing a value in code Giselle[_2_] Excel Programming 4 May 9th 06 11:27 AM
storing of VBA code kurt Excel Programming 4 January 13th 06 06:27 PM
Storing Data in code? (relative primes to MOD as example) jasonsweeney[_86_] Excel Programming 3 August 22nd 05 12:44 AM
Storing data Bob Mckenzie New Users to Excel 3 July 30th 05 07:33 PM


All times are GMT +1. The time now is 02:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"