Formula to find row number of previous record of a specific stock/Company
Hi, altogether.
I am using Numbers 4.3.1 to manage my stock portfolio. I used Google sheets before but really like to switch over to Numbers after I got my new Mac. I have solve many formulas already from reading this forum, but I kinda stuck with this one (and I guess I can be stuck with others as well later 🙂 )
In my transaction table, I like to have a cell to show ‘Previous Row’ of last transition of a specific stock. As seen in the image, Johnson & Johnson (C2) are recorded as “0” in H2. In row 8, I like Johnson & Johnson to show “2” in H8.
In my previous Google sheets the formula in cell H2 is =if(isblank(B2),,arrayformula(max(if($C$1:$C1=C2,row($C$1:$C1))))).
If “Type” of transaction is blank, notting happen. But if something is recorded in B2 it looks for “C2” in a range of cell, and then look for the highest row number it is recorded. I guess you guys can see what the formula is.
Below that cell, in cell H3, the formula changed to =if(isblank(B3),,arrayformula(max(if($C$1:$C2=C3,row($C$1:$C2))))) and so on.
In Numbers, I tried =IF(ISBLANK(B3);"";MAX(IF(C$1:C$2=C3;ROW(C$1:C$2);if-false))), but it is obviously wrong. The message I get is "The range C1:C2 can't be used as a single value." So, how do I get around?
Note: !!The numbers you see in row H is “hard-typed” by me in sake of other formulas.!!
Thank you
frankiecarl
MacBook Pro TouchBar and Touch ID, macOS High Sierra (10.13.2)