+ Reply to Thread
Results 1 to 8 of 8

Formula problems - IF, IFERROR and INDEX functions

  1. #1
    Registered User
    Join Date
    08-14-2017
    Location
    London
    MS-Off Ver
    2013
    Posts
    4

    Formula problems - IF, IFERROR and INDEX functions

    Hi all,

    Sorry if this is the wrong forum to post on (my first ever post!)

    So I have the below formula problem which I can't figure out. I've pasted below and hardcoded the correct numbers the table should show but I can't for the life of me figure out the formula. I am generally a basic user so please do let me know where I'm going wrong.

    Thanks
    Attached Files Attached Files
    Last edited by Felics99; 08-14-2017 at 12:42 PM.

  2. #2
    Registered User
    Join Date
    08-14-2017
    Location
    London
    MS-Off Ver
    2013
    Posts
    4

    Re: Formula problem

    For reference (and maybe ease) the formula in the bar is:


    =IFERROR(IF(ROW()<>2,INDEX((array($N$4:$N6,$B$4:$B6<>"",ROW($B$4:$B6)=MAX(IF($B$4:$B6=B7,ROW($B$4:$B6),0)))),1),0),0)

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula problem

    Pictures of Excel sheets are of limited value.


    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Also, please change the title of yoour post to be meaningful (what would you google to try to find a solution)... Change the thread title by selecting thread tools formt the top of your first post.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    08-14-2017
    Location
    London
    MS-Off Ver
    2013
    Posts
    4

    Re: Formula problems - IF, IFERROR and INDEX functions

    Hi,

    Anyone?

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,917

    Re: Formula problems - IF, IFERROR and INDEX functions

    You haven't told us what the formula is meant to be doing. In words, please, and tell us your expected outcomes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    08-14-2017
    Location
    London
    MS-Off Ver
    2013
    Posts
    4

    Re: Formula problems - IF, IFERROR and INDEX functions

    Hi apologies,

    So the spreadsheet should show a second table below the original one which shows the expected outcomes (hardcoded).

    Essentially the formula is supposed to pick up the older coin references from previous lines so for eg line 1 may have 100 units (identifier ABC) then line 2 may have 50 units (same identifier).

    This means previous units on line 2 should be 100 and cumulative units should be 150 as they represent the same identifier (ABC).

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Formula problems - IF, IFERROR and INDEX functions

    Hello Felics99 and Welcome to Excel Forum.
    If I understand correctly the a formula that will yield expected values in the range M4:M8 is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It also appears that a formula that will yield expected values in the range P4:P8 is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It appears that the formula in O4:O8 is already yielding expected results.
    The formula in S8 gives an unexpected result however I don't understand from where the expect value ($541.84) was derived.
    Without understanding the formula for S4:S8 I feel it is fruitless to try and work on formulas for T4:T8 and U4:U8.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Formula problems - IF, IFERROR and INDEX functions

    Exactly what are you trying to d in column Q. the formula doesn't make much sense, I think....

+ 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. [SOLVED] Formula Problem
    By thiskeep in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2015, 12:22 AM
  2. Replies: 1
    Last Post: 01-06-2014, 03:54 AM
  3. problem with the use of MOD formula
    By kopo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-25-2013, 07:15 PM
  4. Replies: 7
    Last Post: 02-03-2013, 06:25 PM
  5. Replies: 2
    Last Post: 01-22-2013, 07:09 AM
  6. Problem reading formula with ActiveCell.Formula
    By Matija in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2011, 06:10 AM
  7. problem with formula
    By h-demon in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 03-10-2005, 10:21 AM

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