Previous value row number - Stock Spreadsheet

leeboy168

New Member
Joined
Nov 5, 2015
Messages
8
Hi guys,

I'm not an expert, but I'm currently trying to replicate a stock portfolio spreadsheet that was completed in Google Sheets (because I like excel better) and can't for the life of me figure out how to find the previous row number of a certain value. In the example below, the spreadsheet manages to find the previous row number of "Macquarie International Infrastructure Fund" - are you guys able to provide me with an excel formula that does this?

The google spreadsheet formula is: =ARRAYFORMULA(max(if($C$1:$C6=C7,row($C$1:$C6))))

wsa8as.jpg
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Array formulas are created in Excel by pressing Ctrl+Shift+Enter at the same time. So you'll want to erase the ArrayFormula function from the google sheet (see below) and press Ctrl+Shift+Enter for it to work properly.

Code:
=max(if($C$1:$C6=C7,row($C$1:$C6)))
 
Upvote 0
Array formulas are created in Excel by pressing Ctrl+Shift+Enter at the same time. So you'll want to erase the ArrayFormula function from the google sheet (see below) and press Ctrl+Shift+Enter for it to work properly.

Code:
=max(if($C$1:$C6=C7,row($C$1:$C6)))

Doh! Thanks Locke!!
 
Upvote 0

Forum statistics

Threads
1,215,706
Messages
6,126,334
Members
449,309
Latest member
kevinsucher

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top