LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 132
Default Macro if and / or statement

Hi:

I am having difficulty writing a macro with the if and /or together.

Column C will be = "GOOD" if B is different than "VOY" and A is iqual to
London and Cambridge.

A B C
London VOY
Cambridege GOOD
London GOOD

I have the below string but it is just evaluating the second part of the
string
Do (the and conditions)
If ActiveCell.Offset(0, -1) < "VOY" And ActiveCell.Offset(0, -2) = "
London" Or ActiveCell.Offset(0, -2) = "Cambridge" Then
ActiveCell.Value = "GOOD"
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Loop Until ActiveCell.Offset(0, -13) = ""

Could anyone help me please.

Thanks,
Orquidea
 
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 statement in macro orquidea Excel Discussion (Misc queries) 2 May 11th 08 08:19 PM
If statement in macro punter Excel Discussion (Misc queries) 3 June 20th 06 12:23 PM
can i use an IF Statement to run a macro? Davidrowland88 Excel Worksheet Functions 2 February 11th 05 12:45 PM
If statement in a Macro Dave Excel Discussion (Misc queries) 1 January 29th 05 12:17 AM
if statement in Macro John Excel Worksheet Functions 6 December 29th 04 07:17 PM


All times are GMT +1. The time now is 11:30 AM.

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"