I can't see anything obviously wrong witht the code, can you copy those ranges on to a sheet and post it here so that we can see it in action?
Have you tried putting msgboxes in the code after the if statements to see what the values are that are being found by the code?