+ Reply to Thread
Results 1 to 7 of 7

Finding value against specific cell against 2 conditions

  1. #1
    Registered User
    Join Date
    04-20-2018
    Location
    India
    MS-Off Ver
    MS office 2016
    Posts
    31

    Question Finding value against specific cell against 2 conditions

    Hello Excel mates,
    I am trying to build a portfolio tracking sheet customized specifically for tracking mutual fund. Where I came across a problem that I will explain again in detail here.

    Sheet will consist of data entries which are:
    1. Every month there will be some money invested and that I named as "SIP".
    2. And at some point of time I will withdraw that money which I labelled as "Sell".
    Please have a look into the test sheet attached here.

    The data here contains column D as sell or SIP/Sell transactions, Column E is amount invested or withdrawn, column F has Net asset value (NAV) and column G contains Units allotted.

    Now I want to write a formula to auto calculate NAV in Cell H2 (Yellow highlighted cell) depending on following 2 cases:
    1. If Column D has one or more "Sell" entries, then the NAV should be weighed average of no of units and NAV against sell rows. Here as per the data entered it will be (((F35*G35)+(F38*G38))/(G35+G38)) i.e. 21.8939 (answer). Weighted average calculated in cell J15 just for a reference.
    Or the second case will be:
    2. If column D doesn't have "Sell" entry, the formula should give a NAV value entered against latest date SIP investment / Div. Re-invest. In this case it will F37 i.e. 23.07 (answer).

    I hope I am being clear on the question that I want to ask. Let me know if you need any more information on this.

    Rushi.
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Finding value against specific cell against 2 conditions

    Try
    =IFERROR(1/(1/(SUMPRODUCT(--(D4:D500="Sell"),F4:F500,G4:G500)/SUMIF(D4:D500,"Sell",G4:G500))),LOOKUP(99^99,F:F))
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Finding value against specific cell against 2 conditions

    Why F35 and F38 ????

  4. #4
    Registered User
    Join Date
    04-20-2018
    Location
    India
    MS-Off Ver
    MS office 2016
    Posts
    31

    Re: Finding value against specific cell against 2 conditions

    John Topley,
    F35 and F38 is because there is a "Sell" value in column D against those rows.
    Last edited by rishiambekar; 04-20-2018 at 05:08 AM.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Finding value against specific cell against 2 conditions

    Sambas has given you the formula.

    Re my question: I should have looked more carefully at the data!!!

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Finding value against specific cell against 2 conditions

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Registered User
    Join Date
    04-20-2018
    Location
    India
    MS-Off Ver
    MS office 2016
    Posts
    31

    Re: Finding value against specific cell against 2 conditions

    Thanks nflsales,
    I have tested formula and it perfectly works.

    John Topley,
    I have changed the status of the thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help Finding Specific cell
    By beetlejuicee in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-05-2016, 09:52 AM
  2. [SOLVED] Attribute a specific number to a specific cell if conditions are fulfilled
    By joel.mugabe in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-05-2016, 10:16 AM
  3. [SOLVED] Finding specific data in cell comments and finding the line# in comments it appears on
    By tv69 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-11-2014, 04:26 PM
  4. Finding first five items in a pair of lists under specific conditions
    By david.aukerman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-13-2013, 11:27 AM
  5. [SOLVED] Finding a specific value in a cell
    By yr25 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2012, 03:41 AM
  6. [SOLVED] Highlighting a cell when specific conditions met
    By jpsprack in forum Excel General
    Replies: 5
    Last Post: 07-05-2012, 06:22 PM
  7. Finding a cell with 2 conditions
    By T De Villiers in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-28-2006, 02:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1