Macro To Copy Rows From One Worksheet To Anot [Solved/Closed]

Report
-
 Gowind -
Hi ,
I'd like to know if there's a macro that can be run to check one worksheet. In this worksheet there is a column where the value should be "true". If this value is true, I'd like to copy the entire row of data into another worksheet which resides at server.
There can be multiple rows of data where this condition is met.Its very urgent please any one help..

Any suggestions would be greatly appreciated.

Thanks ,
Govind

8 replies

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.
4
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Thanks for reply,

But i am very new to Macro's ,can you suggest me any reference.
Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
791
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.
Hi,
I used auto filter but i am getting following error msg

Run-Time error '1004'
Auto Filter method of Range class failed
Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
791
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.
Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
791
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
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.
Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
791
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

sub undo
worksheets("sheet2").cells.clear
end usb 
Great its Working Fine.........

Thanks alot.