Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am trying to create an if then statment that uses as its condition. IF active.cell.value = (A or B) and Activecell(offset(0,3).value = C then execute. I am having problems with (A or B). I could use some help with the context of the statement. A,B, and C are all different ComboBox values. This is part of a look up routine that sets down through one sheet and then copies values to another sheet. Thanks in advance, Frank |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Frank Brown wrote:
Hi, I am trying to create an if then statment that uses as its condition. IF active.cell.value = (A or B) and Activecell(offset(0,3).value = C then execute. Correct syntax would be: If (ActiveCell.Value = A Or Activecell.Value = B) And _ ActiveCell.Offset(0,3).Value = C Then ' Code if condition is true End If Regards, -- Beto Reply: Erase between the dot (inclusive) and the @. Responder: Borra la frase obvia y el punto previo. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Frank,
Try this With ActiveCell If (.Value = A OR .Value = B) AND .Offset(0,3).Value = C Then '... End If End With -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Frank Brown" wrote in message om... Hi, I am trying to create an if then statment that uses as its condition. IF active.cell.value = (A or B) and Activecell(offset(0,3).value = C then execute. I am having problems with (A or B). I could use some help with the context of the statement. A,B, and C are all different ComboBox values. This is part of a look up routine that sets down through one sheet and then copies values to another sheet. Thanks in advance, Frank |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If Condition | Excel Discussion (Misc queries) | |||
lookup with multiple condition, but one condition to satisfy is en | Excel Worksheet Functions | |||
Combine an OR condition with an AND condition | Excel Discussion (Misc queries) | |||
Max or Min with condition | Excel Worksheet Functions | |||
Condition 1 overules condition 2? | Excel Worksheet Functions |