Thread: Looping
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Paul W Smith[_4_] Paul W Smith[_4_] is offline
external usenet poster
 
Posts: 27
Default 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