Macro To Copy Rows From One Worksheet To Anot
Solved/Closed
Related:
- Macro To Copy Rows From One Worksheet To Anot
- Transfer data from one excel worksheet to another automatically - Guide
- How to copy macro from one workbook to another - Guide
- How to delete rows in word - Guide
- Add worksheet vba - Guide
- How to repeat rows in excel - Guide
8 responses
well,
its working fine ,but when ever i rum the macro it is fitching records in distination sheet different different locations,how to over come it.and also i am trying to copy the rows from 3 different users to a single file,
is it possible..?,
i am sorry to my blind english language.
its working fine ,but when ever i rum the macro it is fitching records in distination sheet different different locations,how to over come it.and also i am trying to copy the rows from 3 different users to a single file,
is it possible..?,
i am sorry to my blind english language.
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
2 Mar 2011 à 05:08
2 Mar 2011 à 05:08
autofilter the whole data according to your criteria and copy the filered data to the server. after copying remove the filter can you RECORD the macro and use it.
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
2 Mar 2011 à 20:52
2 Mar 2011 à 20:52
at present do not record the macro.
just manually autofilter and copy the filtered data to another location.
see help on autofilter if necessary
once or twice if your autofilter method is ok then you can RECORD the macro.
what I mean is
1. in the sheet click tools-macro-record macro
2. you accept the name and click olk
3. an icon for stop macro comes up. do not do anything in that icon now
4. now you do your steps. autofilter copying and again stopping the filter etc
5. after successfully doing what you want to do.lclick stop macro icon
6. clear the filtered data you have copied in another sheet
7.now click tools macro-macros and highlight the macro you have recorded (it will be like macaro1 or macro 2 etc).
8. click run on the right side.
9. see what happens.l
9. if there is problem or error post the macro which you have recorded.
just manually autofilter and copy the filtered data to another location.
see help on autofilter if necessary
once or twice if your autofilter method is ok then you can RECORD the macro.
what I mean is
1. in the sheet click tools-macro-record macro
2. you accept the name and click olk
3. an icon for stop macro comes up. do not do anything in that icon now
4. now you do your steps. autofilter copying and again stopping the filter etc
5. after successfully doing what you want to do.lclick stop macro icon
6. clear the filtered data you have copied in another sheet
7.now click tools macro-macros and highlight the macro you have recorded (it will be like macaro1 or macro 2 etc).
8. click run on the right side.
9. see what happens.l
9. if there is problem or error post the macro which you have recorded.
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
3 Mar 2011 à 19:53
3 Mar 2011 à 19:53
your recorded macro needs tweaking.
perhaps in the macro when you copy the filtered data to destination sheet this destination sheet remains as activesheet. so when you rerun the macro the destination sheet is the active sheet where as source sheet shd be the active sheet. instead of using the statement activesheet use
worksheets("......).activate in the macro (you must always tweak the RECORDED macro.
post your recorded macro and the way out will be shown to you
perhaps in the macro when you copy the filtered data to destination sheet this destination sheet remains as activesheet. so when you rerun the macro the destination sheet is the active sheet where as source sheet shd be the active sheet. instead of using the statement activesheet use
worksheets("......).activate in the macro (you must always tweak the RECORDED macro.
post your recorded macro and the way out will be shown to you
Great, now its working Fine but i am geting replication of data in destination Workbook,i.e when user runs the macro more than one time the data get duplicating..how to over come this one.
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
4 Mar 2011 à 04:35
4 Mar 2011 à 04:35
before running the macro second time you have to delete the cells in destination field for which you can have a small macro
e.g
e.g
sub undo
worksheets("sheet2").cells.clear
end usb