+ Reply to Thread
Results 1 to 6 of 6

Lookup duplicated code and Return the amount against the Oldest Year of that Code

  1. #1
    Registered User
    Join Date
    11-08-2019
    Location
    Kampala
    MS-Off Ver
    Office 2007
    Posts
    10

    Lookup duplicated code and Return the amount against the Oldest Year of that Code

    Hi all,

    I need a formula that can Lookup duplicated code and Return the amount against the Oldest Year of that Code as attached

    Thanks
    Attached Files Attached Files

  2. #2
    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
    79,375

    Re: Lookup duplicated code and Return the amount against the Oldest Year of that Code

    One way - in H4:

    =INDEX($D$4:$D$19,MATCH(1,($B$4:$B$19=G4)*(VALUE($C$4:$C$19)=MIN(IF($B$4:$B$19=G4,VALUE($C$4:$C$19)))),0))

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

    Copy down.
    Attached Files Attached Files
    Last edited by AliGW; 04-29-2022 at 11:03 AM. Reason: Workbook attached.
    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.

  3. #3
    Registered User
    Join Date
    11-08-2019
    Location
    Kampala
    MS-Off Ver
    Office 2007
    Posts
    10

    Re: Lookup duplicated code and Return the amount against the Oldest Year of that Code

    Thanks AliGW,

    Please create for me another column with a formula to return the year in which the amount was found

  4. #4
    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,005

    Re: Lookup duplicated code and Return the amount against the Oldest Year of that Code

    Try

    =INDEX($C$4:$C$19,MATCH($H4,$D$4:$D$19,0))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  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
    79,375

    Re: Lookup duplicated code and Return the amount against the Oldest Year of that Code

    Use this:

    =MIN(IF($B$4:$B$19=G4,VALUE($C$4:$C$19)))

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Attached Files Attached Files
    Last edited by AliGW; 04-29-2022 at 04:14 PM.

  6. #6
    Registered User
    Join Date
    11-08-2019
    Location
    Kampala
    MS-Off Ver
    Office 2007
    Posts
    10

    Re: Lookup duplicated code and Return the amount against the Oldest Year of that Code

    Much Appreciated ....God bless you more

+ 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. Replies: 2
    Last Post: 11-09-2019, 05:56 AM
  2. [SOLVED] vba code to copy charges code,their respective cells and sum their amount
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-12-2017, 08:46 AM
  3. [SOLVED] Vba code to lookup newest and oldest date
    By UPA in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-01-2017, 07:27 AM
  4. [SOLVED] VBA Code to return data if within X amount of hours
    By Reapz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-15-2014, 01:35 PM
  5. Lookup a Code and Return Text
    By ckenn134 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-27-2013, 08:34 AM
  6. trying to return a year to date amount
    By bumpty in forum Excel General
    Replies: 4
    Last Post: 03-04-2011, 12:20 PM
  7. Sumproduct formula:Empl Code Payroll Code Amount
    By bluemeg in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-30-2009, 02:08 PM

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