Portfolio Tracker

%3CLINGO-SUB%20id%3D%22lingo-sub-3339964%22%20slang%3D%22en-US%22%3EPortfolio%20Tracker%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3339964%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20having%20trouble%20with%20the%20'previous%20units'%20column%20only%20returning%20a%20value%20of%200.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20looking%20to%20return%20the%20value%20in%20the%20'cumulative%20units'%20column%20if%20the%20value%20in%20the%20'stock'%20column%20finds%20a%20previous%20match.%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20know%20how%20to%20solve%20this%3F%26nbsp%3B%3C%2FP%3E%3CP%3EBelow%20I%20have%20attached%20an%20example%20snip%20of%20the%20first%202%20rows.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22nurhtive_0-1652020319090.png%22%20style%3D%22width%3A%20748px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F370039i35098C5390A66000%2Fimage-dimensions%2F748x96%3Fv%3Dv2%22%20width%3D%22748%22%20height%3D%2296%22%20role%3D%22button%22%20title%3D%22nurhtive_0-1652020319090.png%22%20alt%3D%22nurhtive_0-1652020319090.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3339964%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3340068%22%20slang%3D%22en-US%22%3ERe%3A%20Portfolio%20Tracker%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3340068%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1384234%22%20target%3D%22_blank%22%3E%40nurhtive%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETry%20this%20in%20J3%3A%3C%2FP%3E%0A%3CP%3E%3DIF(OR(%24C3%3D%22%22%2CROW(%24C3)%3D2)%2C%22%22%2CXLOOKUP(%24C3%2C%24C2%3A%24C%242%2C%24I2%3A%24I%242%2C%22%22%2C0%2C-1))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFill%20down.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi all, 

 

I'm having trouble with the 'previous units' column only returning a value of 0. 

I am looking to return the value in the 'cumulative units' column if the value in the 'stock' column finds a previous match. 

Does anyone know how to solve this? 

Below I have attached an example snip of the first 2 rows. 

 

Many thanks

 

nurhtive_0-1652020319090.png

 

1 Reply

@nurhtive 

Try this in J3:

=IF(OR($C3="",ROW($C3)=2),"",XLOOKUP($C3,$C2:$C$2,$I2:$I$2,"",0,-1))

 

Fill down.