![]() |
Moving rows to another worksheet based on content of cell
Hi all, Is it possible using VB to move rows which contain a certain value in one of the columns. For example, if column G contained success, that row would be moved to the success worksheet. Any help greatly appreciated. Thanks -- 5tin@ ------------------------------------------------------------------------ 5tin@'s Profile: http://www.excelforum.com/member.php...o&userid=27499 View this thread: http://www.excelforum.com/showthread...hreadid=470164 |
Moving rows to another worksheet based on content of cell
Yes. You would loop through the cells in column G from point A to point B,
looking for "success". If found Then EntireRow.Cut Destination:= Worksheets("Success").Row(?). You would need to do a row count on each sheet to set point A to B to search in and a continual row count on the Success sheet to find next available row. The exact code depends upon other factors you have not mentioned, ie. do you want to move remaining rows up to fill the void made by removing a row, does the Success sheet have a header, do you want to start with row 1 or row 2, etc. Now you know it can be done, let us know how you want it done. Mike F "5tin@" wrote in message ... Hi all, Is it possible using VB to move rows which contain a certain value in one of the columns. For example, if column G contained success, that row would be moved to the success worksheet. Any help greatly appreciated. Thanks -- 5tin@ ------------------------------------------------------------------------ 5tin@'s Profile: http://www.excelforum.com/member.php...o&userid=27499 View this thread: http://www.excelforum.com/showthread...hreadid=470164 |
Moving rows to another worksheet based on content of cell
I am trying to do something similar but I really don't know anything about
VB. I would like to reference a certain column and copy that row to another sheet based on the content of the column. Any help would be greatly appreciated. "Mike Fogleman" wrote: Yes. You would loop through the cells in column G from point A to point B, looking for "success". If found Then EntireRow.Cut Destination:= Worksheets("Success").Row(?). You would need to do a row count on each sheet to set point A to B to search in and a continual row count on the Success sheet to find next available row. The exact code depends upon other factors you have not mentioned, ie. do you want to move remaining rows up to fill the void made by removing a row, does the Success sheet have a header, do you want to start with row 1 or row 2, etc. Now you know it can be done, let us know how you want it done. Mike F "5tin@" wrote in message ... Hi all, Is it possible using VB to move rows which contain a certain value in one of the columns. For example, if column G contained success, that row would be moved to the success worksheet. Any help greatly appreciated. Thanks -- 5tin@ ------------------------------------------------------------------------ 5tin@'s Profile: http://www.excelforum.com/member.php...o&userid=27499 View this thread: http://www.excelforum.com/showthread...hreadid=470164 |
All times are GMT +1. The time now is 12:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com