View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Learning VBA[_3_] Learning VBA[_3_] is offline
external usenet poster
 
Posts: 4
Default Excel Logic needs a Doctor !! FORMULA FIX DESIRED!!

Vasant, Diana: We are getting close...........
After your formulas, I think I can now clarify exactly what I desire
from this effort:

Table A2:E8
ORIGIN
DFW
PHX
DTW
MKE
PIT
IAH

Desired Column Conditions
Keep (desired value=1) all NW flights with DTW, MEM, or MSP in
origin/destin
Remove (desired value=0) all other NW flights
Remove (desired value=0) all CO flights with DTW, MEM, or MSP in
origin/destin
Keep (desired value=1) all other CO flights
Keep (desired value=1) all other airline flights

Formula in D3
=IF((OR(A3="DTW",A3="MEM",A3="MSP",B3="DTW",B3="ME M",B3="MSP")*(OR(C3="C
O",C3="NW")))=1,0,IF(C3<"CO",IF(C3<"NW",1,"0")," 1"))

This works for all conditions except the row with DTW, IAH, NW - which
gives me gives a value of 0, when the conditions need it to be =1
For reference puposes, the correct values are presented in Column E,
labeled the "desired" column.


Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!