Thread: IF OR problem
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
ksean ksean is offline
external usenet poster
 
Posts: 55
Default IF OR problem

Chip,

Your approach is brand new to me and I find it quite interesting, how can I
apply it to my spread sheet as I am not familiar with Select Case statements?
I am very eager to learn however!

Kerry


"Chip Pearson" wrote:

The basic logic isn't clear from your example, but you can use nested
Select Case statements to test the values. Adjust the following code
as desired.

Dim Result As Variant
Select Case Range("E3")
Case "U6"
Result = 120
Case "U8"
Result = 150
Case "U10", "U12", "U14"
Select Case Range("G3")
Case "com"
Result = 350
Case "dev"
Result = 380
Case "tier"
Result = 410
End Select
Case Else
Result = "none of the above"
End Select


Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]





On Thu, 3 Dec 2009 13:16:01 -0800, ksean
wrote:


If E3 = "U6" then €œ120€ or
= "U8" then €œ150€ or
= "U10" or "U12" or "U14" or "U16" and G3 = €œcom€ then €œ350€ or
= "U10" or "U12" or "U14" or "U16" and G3 = €œdev€ then €œ380€ or
= "U10" or "U12" or "U14" or "U16" and G3 = €œTier€ then €œ410€ or
= "U18" then €œ375€

.