LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Add one more condition

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/



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
if & And condition shajizz[_3_] Excel Worksheet Functions 3 January 27th 10 05:33 PM
lookup with multiple condition, but one condition to satisfy is en Eddy Stan Excel Worksheet Functions 2 October 27th 07 02:06 PM
Combine an OR condition with an AND condition Will Excel Discussion (Misc queries) 1 April 6th 07 03:52 PM
If condition Lavanya Excel Discussion (Misc queries) 4 November 20th 06 08:56 AM
Condition 1 overules condition 2? Bultgren Excel Worksheet Functions 2 January 20th 06 12:29 PM


All times are GMT +1. The time now is 12:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"