• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Xlookup & SUMIF

RehanRao

New Member
I have following data:
Pass #AUDCADAUDCHFAUDJPYAUDNZDAUDUSDCADCHFCADJPYCHFJPYEURAUDEURCAD
1232345-90-98786534
2983456-9-974534556
3-889805456-3245-90434
4-4576-9-2-563334-87244
5-10065-9-145-4424-9732355
6-9865-9-846-55-9055645
767-9-569459-45-87345-90
84-4-899489-19276
932-9690856-89-45-46345-80
106787-87745698-67-2357-88
114564-4564690-56-1178654
123345796-98-90-34-8943
133467678567-45-3433
142378577557100-34333
15-23-12-34-90-98900-4543-65

Each Pass # have its corresponding profit/loss across currency pair. Foss # 1, AUDNZD & AUSUSD are -ve (-188 is there sum). Pass # 1 profit is 23+23+45+78+6+5+3+4=187 if we dont count -90-98 = -181. For same AUDNZD and AUDUSD pair, pass # 10 has max profit (456+7=463). I want to have a formula probably using Xlookup and SUMIF (or anything else) where is can maximize profit using two passes; one for max profit (using SUMIF(B2:K2,">0") and taking the largest value. for 2nd pass, i need to look at -ve values of currency pair of 1st pass and finding the best profit value for the same Pairs in second pass. How can i do it?
 
Back
Top