View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
onedaywhen onedaywhen is offline
external usenet poster
 
Posts: 459
Default Excel Logic needs a Doctor !! FORMULA FIX DESIRED!!

Try this formula:

=OR(OR(A2={"DTW","MEM","MSP"},C2={"DTW","MEM","MSP "}),NOT(E2="NW"))*NOT(AND(OR(A2={"DTW","MEM","MSP" },C2={"DTW","MEM","MSP"}),E2="CO"))

--
Learning VBA wrote in message ...
MY PREVIOUS POST WAS INCOMPLETE.....check this out


Once again, after your formulas, I think I can now clarify exactly what
I desire from this effort:

Table A2:E8
ORIGIN DESTIN AIR NOW DESIRED
DFW IAH 8W 1 1
PHX IAH HP 1 1
DTW IAH NW 0 1
MKE IAH NW 0 0
PIT IAH CO 1 1
IAH DTW CO 0 0

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 at this time:
=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.

Please help me out on this one, thanks









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