Google Sheet Function updated for Excel

dmcmaste

New Member
Joined
Mar 31, 2020
Messages
15
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
I am trying to replicated this Google Sheet in Excel. I can't get the array/filter functionality in Column I, L working correctly in Excel. Can anyone please help replicate/troubleshoot.


For Column I - if it is the first time buying the stock previous units should be 0 otherwise added Transacted Units (Column D) to the previously bought Cumulative Unites (Column J).
Fol Column L - If it is the first time buying the stock it should be 0 otherwise it should be the previous Cumulative Cost (Column O) and added to the new transacted value (Column K)


Thanks!
 
Try

=IFERROR(LOOKUP(2,1/($C$2:$C$1000=$S5)/($B$2:$B$1000="buy"),$J$2:$J$1000),"")

=IFERROR(LOOKUP(2,1/($C$2:$C$1000=$S5)/($B$2:$B$1000="buy"),$O$2:$O$1000),"")
Thanks for the reply. I will try later today! Really appreciate it!
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Try

=IFERROR(LOOKUP(2,1/($C$2:$C$1000=$S5)/($B$2:$B$1000="buy"),$J$2:$J$1000),"")

=IFERROR(LOOKUP(2,1/($C$2:$C$1000=$S5)/($B$2:$B$1000="buy"),$O$2:$O$1000),"")

Worked perfectly. Thanks!
 
Upvote 0

Forum statistics

Threads
1,215,373
Messages
6,124,553
Members
449,170
Latest member
Gkiller

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