简体   繁体   English

Microsoft Excel参考数据

[英]Microsoft Excel Referencing data

I am trying to figure out how to look up a cell to see if it contains a name from a list I have specified, we will use "Hofmann Trucking" for example. 我试图弄清楚如何查找一个单元格,以查看它是否包含我指定的列表中的名称,例如,我们将使用“ Hofmann Trucking”。

Using columns a,b and c where column a contains average hours it takes for truck to travel from point a to point b, column b contains the carrier information (Hofmann Trucking) and finally column c which is where I would like the answer to go. 使用a,b和c列,其中a列包含卡车从a点到b点的平均行驶时间,b列包含承运人信息(霍夫曼货运公司),最后c列是我希望得到的答案。

I want column c to return the time listed in column a, only if Hofmann trucking is the carrier in column b. 我希望c列返回a列中列出的时间,仅当Hofmann货运是b列中的承运人时。 If another carrier is listed I would like to put that information in column d. 如果列出了其他承​​运人,我想将该信息放在d列中。

In the end these times will be averaged per carrier per day so I can easily show how much time is spent traveling to and from certain areas by different companies. 最后,这些时间将平均为每个运营商每天的费用,因此我可以轻松地显示出不同公司往返某些区域所花费的时间。

This should do it: 应该这样做:

Col A       Col B                Col C                             Col D
8           Hoffman Trucking     =If(B1="Hoffman Trucking",A1,0)   =A1-C1

Put those 2 formulas in columns C & D and drag down... 将这2个公式放在C和D列中,然后向下拖动...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM