![]() |
Looping
Hi I have a a P & L in excel that changes depending on what dept is entered into a particluar cell. In the same book i have a list of the depts in a column. What i want to be able to do is have a macro that goes through the column placing each dept into the cell with in the P & L sheet so that a new P&L is created for each dept until all depts have been done i.e raches a blank cell. Thanks -- Embalmer ------------------------------------------------------------------------ Embalmer's Profile: http://www.excelforum.com/member.php...o&userid=17907 View this thread: http://www.excelforum.com/showthread...hreadid=499165 |
Looping
Dim c as range
For each c in {range containing dept list} target cell (you called it 'a particular cell) = c Next c "Embalmer" wrote in message ... Hi I have a a P & L in excel that changes depending on what dept is entered into a particluar cell. In the same book i have a list of the depts in a column. What i want to be able to do is have a macro that goes through the column placing each dept into the cell with in the P & L sheet so that a new P&L is created for each dept until all depts have been done i.e raches a blank cell. Thanks -- Embalmer ------------------------------------------------------------------------ Embalmer's Profile: http://www.excelforum.com/member.php...o&userid=17907 View this thread: http://www.excelforum.com/showthread...hreadid=499165 |
All times are GMT +1. The time now is 03:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com