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 automatically transfer data between sheets in Excel - Guide
- Spell number in excel without macro - Guide
- Excel macro to create new sheet based on value in cells - Guide
- How to delete a row in a table in word - 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 June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Mar 2, 2011 at 05:08 AM
Mar 2, 2011 at 05:08 AM
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 June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Mar 2, 2011 at 08:52 PM
Mar 2, 2011 at 08:52 PM
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.
Didn't find the answer you are looking for?
Ask a question
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Mar 3, 2011 at 07:53 PM
Mar 3, 2011 at 07:53 PM
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 June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Mar 4, 2011 at 04:35 AM
Mar 4, 2011 at 04:35 AM
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