Excel公式IF语句

时间:2016-10-06 22:32:12

标签: excel excel-formula

如果你能帮我解决excel公式逻辑,我真的很感激。我能够得到我能够展示的第一部分" 1"在检查栏中是否有"是"在A,B,C列中,金额1,金额2或金额3列中没有值(screenshot attached)

我也希望显示" 1"如果在" No"是A,B,C列,Amount1,Amount2或Amount 3列中的值。

SELECT DISTINCT post_title, wp0.post_id as the_post_id, wp1.meta_value as _sale_price, wp2.meta_value as _regular_price, wp3.meta_value as ex_diameter, wp4.meta_value as ex_center, wp5.meta_value as ex_length, wp6.meta_value as ex_alloy, wp7.meta_value as ex_butt_1, wp8.meta_value as ex_butt_2, wp9.meta_value as ex_taper_1, wp10.meta_value as ex_taper_2, wp11.meta_value as ex_center from wp_postmeta as wp0 INNER JOIN wp_postmeta as wp1 ON wp1.post_id=wp0.post_id INNER JOIN wp_postmeta as wp2 ON wp2.post_id=wp0.post_id INNER JOIN wp_postmeta as wp3 ON wp3.post_id=wp0.post_id INNER JOIN wp_postmeta as wp4 ON wp4.post_id=wp0.post_id INNER JOIN wp_postmeta as wp5 ON wp5.post_id=wp0.post_id INNER JOIN wp_postmeta as wp6 ON wp6.post_id=wp0.post_id INNER JOIN wp_postmeta as wp7 ON wp7.post_id=wp0.post_id INNER JOIN wp_postmeta as wp8 ON wp8.post_id=wp0.post_id INNER JOIN wp_postmeta as wp9 ON wp9.post_id=wp0.post_id INNER JOIN wp_postmeta as wp10 ON wp10.post_id=wp0.post_id INNER JOIN wp_postmeta as wp11 ON wp11.post_id=wp0.post_id INNER JOIN wp_posts as wpp ON wp1.post_id=wpp.ID WHERE wp1.post_id='39' AND wp1.meta_key='_sale_price' AND wp2.meta_key='_regular_price' AND wp3.meta_key='ex_diameter' AND wp4.meta_key='ex_center' AND wp5.meta_key='ex_length' AND wp6.meta_key='ex_alloy' AND wp7.meta_key='ex_butt_1' AND wp8.meta_key='ex_butt_2' AND wp9.meta_key='ex_taper_1' AND wp10.meta_key='ex_taper_2' AND wp11.meta_key='ex_center'

如何将以下公式添加到上面的

=IF(AND(E3="",F3="",G3="",OR(B3="Yes",C3="Yes",D3="Yes")),1,0)

1 个答案:

答案 0 :(得分:1)

=IF(OR(AND(E3= "",F3= "",G3= "",OR(B3="Yes",C3="Yes",D3="Yes")), 
       AND(E3<>"",F3<>"",G3<>"",OR(B3="No" ,C3="No" ,D3="No" ))),1,0)