Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default if or statement

how would i go about doing:
if range("nightly!cu9").value = "AT&T" or "Verizon" then
application.run "addfeatures"
end if

i dont know how to do the OR part
thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default if or statement

Hi
one way

if range("nightly!cu9").value = "AT&T" OR range("nightly!cu9").value
="Verizon" then
application.run "addfeatures"
end if

Cheers
JulieD

"choice" wrote in message
...
how would i go about doing:
if range("nightly!cu9").value = "AT&T" or "Verizon" then
application.run "addfeatures"
end if

i dont know how to do the OR part
thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default if or statement

Bit neater <g

With range("nightly!cu9")
If .value = "AT&T" OR .value ="Verizon" then
application.run "addfeatures"
end if
End With

--

HTH

RP

"JulieD" wrote in message
...
Hi
one way

if range("nightly!cu9").value = "AT&T" OR range("nightly!cu9").value
="Verizon" then
application.run "addfeatures"
end if

Cheers
JulieD

"choice" wrote in message
...
how would i go about doing:
if range("nightly!cu9").value = "AT&T" or "Verizon" then
application.run "addfeatures"
end if

i dont know how to do the OR part
thanks in advance





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default if or statement


One way is to write:
if range("nightly!cu9").value = "AT&T" then
application.run "addfeatures"
elseif range("nightly!cu9").value = "Verizon" then
application.run "addfeatures"
end i

--
daveric
-----------------------------------------------------------------------
daverico's Profile: http://www.excelforum.com/member.php...fo&userid=1566
View this thread: http://www.excelforum.com/showthread.php?threadid=27232

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default if or statement

One mo

select case lcase(worksheets("nightly").range("cu9").value)
case is "at&t","verizon": call addfeatures
end select

I like that format for the range.
I checked for Verizon in any case (VeRiZoN, VERIZON, verizon will all be ok)

And if addfeatures is in the same workbook (and it looks like it to me), you can
just call it--you don't need application.run.



choice wrote:

how would i go about doing:
if range("nightly!cu9").value = "AT&T" or "Verizon" then
application.run "addfeatures"
end if

i dont know how to do the OR part
thanks in advance


--

Dave Peterson



Reply
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 inside a SUMIF statement.... or alternative method Sungibungi Excel Worksheet Functions 3 December 4th 09 06:22 PM
Reconcile Bank statement & Credit card statement & accounting data Bklynhyc Excel Worksheet Functions 0 October 7th 09 09:07 PM
Embedding an OR statement in an IF statement efficiently Chatnoir11 Excel Discussion (Misc queries) 4 February 2nd 09 08:12 PM
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM


All times are GMT +1. The time now is 12:32 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"