Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Macro to ransfer data

hi i try creating a macro to transfer data from one sheet to another but the
pasting is becoming tricky to me. i want to be able paste more than one row
or just one row depending on the data enterd in the transfer area. my macro
is using the relative ref and it paste the first 4 rows i selected correct
but when i used one row it not right

i will like to paste either more or less rows but it should always go to the
next available row thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Macro to ransfer data

What is the "transfer area"? A little more detail about your setup, what you
want to copy and where would be helpful. Also, posting the code you have
that works for multiple rows but not for single rows would be useful to us
too.

--
Rick (MVP - Excel)



"Amin" wrote in message
...
hi i try creating a macro to transfer data from one sheet to another but
the
pasting is becoming tricky to me. i want to be able paste more than one
row
or just one row depending on the data enterd in the transfer area. my
macro
is using the relative ref and it paste the first 4 rows i selected correct
but when i used one row it not right

i will like to paste either more or less rows but it should always go to
the
next available row thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Macro to ransfer data

hi thanks for the advice, here is the recording i made.

Sub Macro10()
'
' Macro10 Macro
'
' Keyboard Shortcut: Ctrl+t
'
Sheets("firstpage").Select
Range("A3:I9").Select
Selection.Copy
Sheets("Inventory").Select
Range("A2").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("firstpage").Select
Range("Form[[PRODUCT ID]:[UNIT PRICES]]").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("Form[[CUSTOMER NAME]:[CONTACT NUMBER]]").Select
Selection.ClearContents
Range("A3").Select

End Sub

all i want to do is paste what ever data has been enterd into the designated
transfer rows whether is one row or i have more than one row it should always
use the next available empty row under the last row with data.

"Don Guillett" wrote:

As ALWAYS, post YOUR code for comments

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Amin" wrote in message
...
hi i try creating a macro to transfer data from one sheet to another but
the
pasting is becoming tricky to me. i want to be able paste more than one
row
or just one row depending on the data enterd in the transfer area. my
macro
is using the relative ref and it paste the first 4 rows i selected correct
but when i used one row it not right

i will like to paste either more or less rows but it should always go to
the
next available row thanks


.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Macro to ransfer data

Try this ONE liner to move values. I may have made a wrong assumption that
the cells tocopy are the same as those to delete????

sub cuttoodstsht()
Sheets("firstpage").Range("A3:I9").cut
Sheets("Inventory").Range("A2").end(xlDown).Offset (1)
end sub

If this doesn't work

If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Amin" wrote in message
...
hi thanks for the advice, here is the recording i made.

Sub Macro10()
'
' Macro10 Macro
'
' Keyboard Shortcut: Ctrl+t
'
Sheets("firstpage").Select
Range("A3:I9").Select
Selection.Copy
Sheets("Inventory").Select
Range("A2").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("firstpage").Select
Range("Form[[PRODUCT ID]:[UNIT PRICES]]").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("Form[[CUSTOMER NAME]:[CONTACT NUMBER]]").Select
Selection.ClearContents
Range("A3").Select

End Sub

all i want to do is paste what ever data has been enterd into the
designated
transfer rows whether is one row or i have more than one row it should
always
use the next available empty row under the last row with data.

"Don Guillett" wrote:

As ALWAYS, post YOUR code for comments

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Amin" wrote in message
...
hi i try creating a macro to transfer data from one sheet to another
but
the
pasting is becoming tricky to me. i want to be able paste more than one
row
or just one row depending on the data enterd in the transfer area. my
macro
is using the relative ref and it paste the first 4 rows i selected
correct
but when i used one row it not right

i will like to paste either more or less rows but it should always go
to
the
next available row thanks


.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Macro to ransfer data


One liner got broken up. Insert a line feed continuation _

sub cuttoodstsht()
Sheets("firstpage").Range("A3:I9").cut _
Sheets("Inventory").Range("A2").end(xlDown).Offset (1)
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message
...
Try this ONE liner to move values. I may have made a wrong assumption that
the cells tocopy are the same as those to delete????

sub cuttoodstsht()
Sheets("firstpage").Range("A3:I9").cut
Sheets("Inventory").Range("A2").end(xlDown).Offset (1)
end sub

If this doesn't work

If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Amin" wrote in message
...
hi thanks for the advice, here is the recording i made.

Sub Macro10()
'
' Macro10 Macro
'
' Keyboard Shortcut: Ctrl+t
'
Sheets("firstpage").Select
Range("A3:I9").Select
Selection.Copy
Sheets("Inventory").Select
Range("A2").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("firstpage").Select
Range("Form[[PRODUCT ID]:[UNIT PRICES]]").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("Form[[CUSTOMER NAME]:[CONTACT NUMBER]]").Select
Selection.ClearContents
Range("A3").Select

End Sub

all i want to do is paste what ever data has been enterd into the
designated
transfer rows whether is one row or i have more than one row it should
always
use the next available empty row under the last row with data.

"Don Guillett" wrote:

As ALWAYS, post YOUR code for comments

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Amin" wrote in message
...
hi i try creating a macro to transfer data from one sheet to another
but
the
pasting is becoming tricky to me. i want to be able paste more than
one
row
or just one row depending on the data enterd in the transfer area. my
macro
is using the relative ref and it paste the first 4 rows i selected
correct
but when i used one row it not right

i will like to paste either more or less rows but it should always go
to
the
next available row thanks

.



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
Write Macro to Fix Data Alignment (Data dump from Crystal to Excel Karin Excel Discussion (Misc queries) 2 September 22nd 09 05:31 PM
Cyclic Data Macro Q | Free Copy Macro badmrfrosty8 Excel Programming 9 December 18th 08 04:26 PM
Excel Macro for taking data external data and populating it on a sheet and deleting unwanted data [email protected] Excel Programming 3 November 8th 07 05:59 AM
Macro to Open the Menu Data,Refresh Data,filename,import Bob Excel Programming 0 February 11th 06 04:51 PM
create macro to move label type data to column data JonathonWood9 Excel Programming 4 February 21st 05 10:53 PM


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

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

About Us

"It's about Microsoft Excel"