In VB, And and Or are not functions, they are operators... you would use
them in much the same way as you would use plus, minus, multiply, etc. For
example...
I'm not sure what you're asking. VBA has its own 'And' and 'Or' comparison
operators. If you want to use the worksheet function, you can do something
like
Application.WorksheetFunction.Or
If you want to create a formula in a cell, try something like
Dim F As String
F = "=OR(A1,B1)"
Range("C1").Formula = F
--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC www.cpearson.com
(email on web site)
Set rng = Selection
For Each cell In rng
If cell.Text = "0" Or cell.Text = "" And _
cell.Offset(0, 3).Value = "hoohah" Then
cell.EntireRow.Interior.ColorIndex = 6
End If
Next
Gord Dibben MS Excel MVP
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.