For Each Cell In Range("D3:AJ19")
If Range("E25").Value = Range("G22") And Cell.Value "" Then
if Cells(cell.row,"AO")= "x" then
cell.Value = Range("AO1").Value
else
for each cell1 in Intersect(Range("AK:AP"),Cell.EntireRow)
if cell1 = "x" then
cell.Value = cells(1,cell1.column)
Exit for
end if
Next cell1
End if
End if
If Range("F25").Value = Range("H22") And Cell.Value "" Then
if Cells(cell.row,"AN")= "x" then
cell.Value = Range("AN1").Value
else
for each cell1 in Intersect(Range("AK:AP"),Cell.EntireRow)
if cell1 = "x" then
cell.Value = cells(1,cell1.column)
Exit for
end if
Next cell1
End if
End if
--
Regards,
Tom Ogilvy
"hotherps " wrote in message
...
Thanks Tom, sorry for the poor explanation.
But I think you had the right approach last time. What I want to do is
check to see if AO = x, if it does continue. If not got to the next
cell in the range AK:AP on the same row.
Is that what the Intersect code is for?
Thanks again
I also agree with you on my whole approach, I guess a case statement
would be more appropriate?
---
Message posted from http://www.ExcelForum.com/