Loop a long formula through range

H

hotherps

I have the following formula that works well:

=IF(AND(B2>=D25,D25<=C2,E24=AK1,AK2="X",E34>E25),E24,"")

I want to loop this formula through each cell in range B2:BB100

The result that is returned E24:p24 is a cell with some text in i
that should be displayed in each cell that meets the criteria in th
row loop range.

But the references to cells in E34>E25 and AK1 need to increment to th
next cell to the right (i.e. F34>F25 and AL1 etc.) in the range (E:p
AK:AV) each time the result of the formula is false or "".

Is this the right approach (long formula and loop)?
If so I need help writing the loop

Thanks!
 
F

Frank Kabel

Hi
not sure why you want to do this in VBA. what is your goal with this
(there may be a simple worksheet function to achieve this)?
 
H

hotherps

Let me explain, first off I pasted the wrong formula, it should hav
been:
=IF(AND(E$1>=$B2,E$1<=$C2,$E$24=$AK$1,$AK$2="X",$E$34>$E$25),$E$24,"")


I'm trying to populate a work schedule with different tasks, If a
employee A2 is working in a time range E1:EI1 (Time of Day) with
start time B2 and an end Time C2 that is within the Time of Day Range

And a task is required E34 > E25

And the employee can do the task AK2 = "X"

Then the cell in the loop range should = E24 (The task name)

Then loop this for each employee in range A1:A100

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top