View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Trevor Shuttleworth Trevor Shuttleworth is offline
external usenet poster
 
Posts: 1,089
Default refer to a formula for use in a loop

I'm not really sure what it is you are trying to do. I guess from the fact
that your previous post has had no replies (yet) that others are in the same
position. What exactly do you mean by "looping through a range of cells
referring to a formula on the active sheet" ?

Perhaps it would help if you gave examples of what you want evaluating and
where the answer should go. What formula do you want generating in cell D2?
D3? D4? ... EI1? ... EI17?

Do you want the formula in cell D17 to be:
=IF(AND(D$1=$B17,D$1<=$C17,$E$24=$AK$1,$AK17="X", $E49$E40),$E$24,"")

And in EI17
=IF(AND(EI$1=$B17,EI$1<=$C17,$E$24=$AK$1,$AK17="X ",$E49$E40),$E$24,"")

If so, you could just drag the fill handle down and copy the formulae.

Do you want code to generate something somewhere ?

Not sure if I'm missing something but, as I say, I don't really understand
the question.

Regards

Trevor


"hotherps " wrote in message
...
Is there a way to loop through a range of cells referring to a formula
on the active sheet? My formula works but I need it to continue to
evalute cells as it goes through the loop.

I do not want to use the formula directly in the cells because there
are too many cells in the loop

I want to loop this formula :

=IF(AND(D$1=$B2,D$1<=$C2,$E$24=$AK$1,$AK2="X",$E3 4$E25),$E$24,"")

Through the range of D2:EI17

Thanks


---
Message posted from http://www.ExcelForum.com/