If then statement with two true conditions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everybody,
I'm trying to make this work without too much success. Is there any other
way to do it?

If ActiveCell.Ofsset(0, 0).Value <> "Li" <> "Sc" <> "Rh" <> "Ho" <> "Kr" And
ActiveCell.Ofsset(0, 2).Value > "0" Then

Range("E82", "F82").Copy Destination:=ActiveCell.Offset(0, 3)
End If

Any help would be appreciated
 
try this instead. You must have each condition specified and properly spell
offset.

If ActiveCell <> "Li" and activecell <> "Sc" and _
activecell <> "Rh" and activecell <> "Ho" and _
activecell <> "Kr" and ActiveCell.Offset(0, 2)>0 Then
Range("E82", "F82").Copy Destination:=ActiveCell.Offset(0, 3)
End If
 
Don,
Thank you Thank you Thank you
Just what I was looking for.
Thanks for your fast answer!

gaba :)
 
With ActiveCell
If (.Value <> "Li" And .Value <> "Sc" And .Value <> "Rh" And _
.Value <> "Ho" And .Value <> "Kr" And .Offset(0, 2).Value > 0)
Then
Range("E82", "F82").Copy .Offset(0, 3)
End If
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top