SOLVED

Summation of values based of on text values

%3CLINGO-SUB%20id%3D%22lingo-sub-2397621%22%20slang%3D%22en-US%22%3ESummation%20of%20values%20based%20of%20on%20text%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2397621%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20would%20like%20yr%20assistance%20in%20my%20following%20requirement%20.%20Attached%20below%20is%20my%20tentative%20work%20sheet.%20My%20concern%20is%20on%20column%20L.%20I%20have%20never%20used%20this%20platform%20before%20so%20I%20will%20try%20to%20explain%20my%20requirement%20as%20descriptive%20as%20possible.%26nbsp%3B%3CBR%20%2F%3EEvery%20transaction%20has%20a%20(buy%20open%20to%20sell%20close)%20or%20(sell%20open%20to%20buy%20close)%20mentioned%20on%20column%20D.%20Buy%20open%20to%20sell%20close%20..here%20in%20this%20case%20%22buy%20open%22%20on%20D12%20and%20%22Sell%20close%20%22%20on%20D15%20...%20and%20correspondingly%20I%20would%20like%20to%20add%20the%20K%20column%20from%20k12%20to%20k15%20and%20show%20it%20on%20L15%20...HERE%20IN%20OUR%20CASE%20the%20answer%20is%20-9750.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3ESimilarly%2C%20I%20I%20would%20like%20to%20add%20from%20%22sell%20open%22%20to%20%22buy%20close%22%20...here%20in%20this%20case%20%22sell%20open%22%20on%20D16%20and%20%22buy%20close%22%20is%20on%20D18%20...I%20would%20like%20to%20add%20corresponding%20all%20values%20between%20them%20in%20the%20K%20column%20from%20k16%20to%20k18%20and%20show%20it%20on%20L18...in%20this%20case%20the%20answer%20is%20-9416%20(L18)%3CBR%20%2F%3E%3CBR%20%2F%3Ein%20my%20excel%20sheet%20L%20column%20I%20have%20manually%20input%20the%20numbers%20...%3CBR%20%2F%3EIs%20thr%20any%20formula%20I%20can%20use%20for%20the%20L%20column%20which%20can%20automatically%20read%20my%20requirement%20and%20show%20the%20transaction%20wise%20profit%20and%20loss%20automatically%20%3F%3CBR%20%2F%3E%3CBR%20%2F%3EYour%20help%20tis%20greatly%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2397621%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2397692%22%20slang%3D%22en-US%22%3ERe%3A%20Summation%20of%20values%20based%20of%20on%20text%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2397692%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1066303%22%20target%3D%22_blank%22%3E%40mohammed3786%3C%2FA%3E%26nbsp%3BPerhaps%20the%20solution%20in%20the%20attached%20workbook%20will%20work%20for%20you.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello, would like yr assistance in my following requirement . Attached below is my tentative work sheet. My concern is on column L. I have never used this platform before so I will try to explain my requirement as descriptive as possible. 
Every transaction has a (buy open to sell close) or (sell open to buy close) mentioned on column D. Buy open to sell close ..here in this case "buy open" on D12 and "Sell close " on D15 ... and correspondingly I would like to add the K column from k12 to k15 and show it on L15 ...HERE IN OUR CASE the answer is -9750. 

Similarly, I I would like to add from "sell open" to "buy close" ...here in this case "sell open" on D16 and "buy close" is on D18 ...I would like to add corresponding all values between them in the K column from k16 to k18 and show it on L18...in this case the answer is -9416 (L18)

in my excel sheet L column I have manually input the numbers ...
Is thr any formula I can use for the L column which can automatically read my requirement and show the transaction wise profit and loss automatically ?

Your help tis greatly appreciated.

2 Replies
best response confirmed by mohammed3786 (Occasional Contributor)
Solution

@mohammed3786 Perhaps the solution in the attached workbook will work for you.

 

Thank you for the prompt reply Riny.
I understood the logic and it works perfectly as intended. Really appreciate it.

Thankyou very much.