Move row based on value in cell
Hi All
I have searched and found lots of examples of moving rows based on the values in a cell but I can't get it so that it loops through several named worksheets (there are other unconnected sheets in the book hence naming them). What I am wishing for is code that will examine cells in column Y and if there is a date to move the entire row to a sheet named Archive.The source row is then cleared (not cut as I want to preserve the formatting).. This macro then goes on to other named sheets. If one of you guys can help it is really appreciated. Kind Regards Angelo |
Move row based on value in cell
Hi Angelo
Ron BeBruin has some great codes that may offer a solution for you. Try these: Create a summary worksheet from all worksheets (formulas with VBA) http://www.rondebruin.nl/summary.htm Create a summary worksheet from different workbooks (formulas with VBA) http://www.rondebruin.nl/summary2.htm Delete row if a specific value exist http://www.ronbebruin.nl/delete.htm HTH Mick |
Move row based on value in cell
Hi Mick
Thank you for replying, have been looking at this all morning in the hope of finding an answer. I use Macro's so infrequently that I get a little mixed up when I try anything complicated. I do recall Ron Bruins page from past and his was the one of the first I turned to except that he now seems to have updated his examples and also uses Excel 2007 - I am on 2003. The delete sheet is useful and whilst I have found similar examples over the net the problem I am having is getting to move the row to a different sheet AND loop through various sheets. Here is a loop I found which I think may be suitable for the looping part, now to find the other bits. Sub looparray() Dim sh As Worksheet For Each sh In Sheets(Array("Sheet2", "Sheet6", "Sheet10")) MsgBox sh.Range("a1") Next End Sub Kind Regards Angelo |
All times are GMT +1. The time now is 06:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com