Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9831

Using Offset for a dynamic range, Would like to include another duplicate range within formula

$
0
0

So I was given a formula which searches for values on columns B (buy/sell), C(ticker) and D(no of shares) with a reference cell A1 which indicates 'table' height.=UNIQUE(FILTER(OFFSET($C$3,0,0,$A$1),ArrayFormula(IF(SUMIF(OFFSET($C$3,0,0,$A$1)&OFFSET($B$3,0,0,$A$1),OFFSET($C$3,0,0,$A$1)&"buy",OFFSET($D$3,0,0,$A$1))-SUMIF(OFFSET($C$3,0,0,$A$1)&OFFSET($B$3,0,0,$A$1),OFFSET($C$3,0,0,$A$1)&"sell",OFFSET($D$3,0,0,$A$1))>0,TRUE))))

For my own use I needed to have a duplicate 'table' which is on column J (buy/sell), K(ticker) and L(no of shares). How do I modify the above formula to include data from this duplicate 'table' (same columns and also same height)?

actiontickerunits
buyAAPL10
buyMSFT5
sellAAPL10
buySPY6

Which will then display MSFT and SPY in an output table since I have fully exited AAPL.

But because I want to line them up side by side because I want to calculate other column data (not evaluated by the formula above) I need the 'pairs' line up within the row.

actiontickerunitsactiontickerunits
buyAAPL10sellAAPL10
buyMSFT5
buySPY6

Viewing all articles
Browse latest Browse all 9831

Latest Images

Trending Articles



Latest Images