Colorizing Excel cells with a date range filter
Let's think about what you're doing for a second.


For ligne = 2 To lastrow
    DoEvents

    For chambre = 1 To 38
    DoEvents
        For alveole = 1 To 6



6 * 38 = 228 iterations for every row. Wow. Yes. There's no wonder you had to give the OS time to operate. 

All of this just to set the interior color of a cell. Which is a problem as well. What if the data changes? Well.... it's going to remain the same, forever as far as I can tell. There's nothing here to revert it. There's a better way. Use some conditional formatting to do this. No VBA needed. Just craft a formula that returns a True/False condition.

I can't claim this one is perfect or tested, but it should get you started. 

=AND(GEMS!$A1 = 1, AND(GEMS!$B1 = COLUMN(), AND(GEMS!$C1 = ROW(), AND(GEMS!$D1 &lt; PHOTO!$O$2, AND(GEMS!$E1 &gt; PHOTO!$O$2)))))