如何使用公式来比较数组中的值

时间:2018-05-06 10:09:54

标签: excel formula lookup

我想在使用查找中设置一个公式,以便在同一供应商和基础上获得不同的(最新的VS last)基础。风格,但失败....

例如:coco,gk,8-Jun VS coco,gk,2-Jun 单元格E3值= -86

任何人都可以帮忙吗?感谢

enter image description here

1 个答案:

答案 0 :(得分:0)

You need a few formulas for this.

Every formula is an Array formula so you must use CTRL + SHIFT + ENTER when leaving the formula bar.

You fist need to find the value last entry for yor vendor and style but before you get the value, you need to get the row of the last entry

void printbinarytree ( node *tree) { int i, number; cout<<" Set #"<<i+1<<"\n"; if (tree == NULL) cout<<"Nothing is in the tree\n"; else { cout<<"Inorder traversal tree: \n"; printInorder(tree); cout<<"Postorder traversal tree: \n"; printPostorder(tree); cout<<"Preorder traversal tree: \n"; printPreorder(tree); printChild(tree); number = countNodes (tree); cout<<number<<" nodes in the tree\n"; } } int main() { struct node *trees [7]; for (int i=0; i<7; i++) trees[i] = NULL; int tempVal = 0, index = 0; string charac; bool edit = false; while (treeFile >>tempVal) { if(tempVal == -999) { cout<<"\n"; printbinarytree (trees[index], index); // message appears here edit = true; while (edit) { treeFile>>charac; else if (charac == "complete") { cout<< "\n The values are"; edit = false; printbinarytree(trees[index], index); //and here } } index++; }

will the return the row number where the vendor and style match the data in A2 and C2.

From the row you can return the value using [HttpPost] Public ActionResult Create(Guid?Id,Car model) { If(ModelState.IsValid) { bookingList=GetBookings(); model.Id=bookingList.Count+1; bookingList.Add(model); TempData["bookingList"]= bookingList; return RedirectToAction("Index"); } return View(model); }

=MAX(IF((A:A=A2)*(C:C=C2),ROW(A:A)-ROW(INDEX(A:A,1,1))+1))

The item row matching the criteria with the maximum date can be found using

index

The value by using index

`index(D:D,MAX(IF((A:A=A2)*(C:C=C2),ROW(A:A)-ROW(INDEX(A:A,1,1))+1)),1)`

Put them together to do the calculation

=IFERROR(MATCH(1,(A2=A:A)*(MAX(IF(A:A=A2,B:B))=B:B)*(C2=C:C),0),ROW())