Dim rng as Range
For Each Cell In Range("D3:AJ19")
If Range("E25").Value = Range("G22") And Cell.Value "" Then
set rng = Nothing
for each cell1 in Intersect(Range("AK:AP"),Cell.EntireRow)
if cell1 = "x" then
' not sure what you mean by return or where to return it to.
set rng = cells(1,cell1.column)
Exit for
end if
Next cell1
if not rng is nothing then
Cell.Value = rng.Value
End if
Next cell
--
Regards,
Tom Ogilvy
--
Regards,
Tom Ogilvy
"hotherps " wrote in message
...
I'm using the following code:
For Each Cell In Range("D3:AJ19")
If Range("E25").Value = Range("G22") And Cell.Value "" Then
Cell.Value = Range("AO1")
This works well, but I want to add another condition.
I 'll write in pseudo code
if col AK on the active row = "x" then return the value in AK1
continue to do this for the following range of columns AK:AP
Thanks
---
Message posted from http://www.ExcelForum.com/