分析Excel代码 [英] Analysing an excel code

查看:83
本文介绍了分析Excel代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在excel中有一个代码,需要将其转换为c ++.我不明白循环.如果有人可以帮忙,那将是很棒的事情!

Hello all,

I have a code in excel, which I need to convert into c++. I cant understand the looping. If anybody can help, that would b great!

=IF((C6-A6)>0, IF((D6-B6)>0,ATAN((C6-A6)/(D6-B6))*180/PI(),180+ATAN((C6-A6)/(D6-B6))*180/PI()),IF((D6-B6)>0,360+ATAN((C6-A6)/(D6-B6))*180/PI(),180+ATAN((C6-A6)/(D6-B6))*180/PI()))





for ease of understanding I have split these into lines :
=IF((C6-A6)>0, 
IF((D6-B6)>0,
ATAN((C6-A6)/(D6-B6))*180/PI(),
180+ATAN((C6-A6)/(D6-B6))*180/PI()),
IF((D6-B6)>0,
360+ATAN((C6-A6)/(D6-B6))*180/PI(),
180+ATAN((C6-A6)/(D6-B6))*180/PI()))



我不明白为什么会有两个"If"语句...



I don''t understand why is there two "If" statements...

推荐答案

,因为我可以从这些行中找出来:IF的工作原理如下

IF(Condition True, Do/Evaluate this, Else Do/Evaluate this) .


对于Double IF:

如果(条件1为true,
要计算的表达式是从另一个IF开始的第二个表达式 ....)

就像

as i could figure out from those lines : the IF works like this

IF(Condition True, Do/Evaluate this, Else Do/Evaluate this).


and for the Double IF:

If (Condition 1 is true,
the expression to evaluate is the seond one beginning by another IF ....)

it is like

if( Cond1 ....)
  if( Cond2 ....)


这篇关于分析Excel代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆