+ Reply to Thread
Results 1 to 16 of 16

Formula to return the last text and value within duplicates

  1. #1
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Formula to return the last text and value within duplicates

    Does anyone know a formula that can return the last text and value within duplicates? for example i have a list of 5 first breaks with time values.

    Column 1 Column 2
    First Break 14:00
    First Break 14:01
    First Break 14:02
    First Break 14:03
    First Break 14:04

    with the above example I would like a formula that only pull the Text with the highest time value in column 2. Is there a formula or a macro that can do this? I am stuck.

    Note there are also other duplicate statuses same as the example.

    Once I get the data to Pull the statuses as one with the highest value, i can run my Filter Macro to copy the data to another sheet.

    Can anyone help me? see my attachment below. My blue field is my formula field.
    Attached Files Attached Files
    Last edited by Shellybelly; 06-28-2016 at 01:58 PM.

  2. #2
    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
    30,769

    Re: Formula to return the last text and value within duplicates

    TRy

    =INDEX($A$1:$A$5,MATCH(MAX($B$1:$B$5),$B$1:$B$5,0))

    I cannot download file as forum gives "Invalid Attachment" message.

  3. #3
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Formula to return the last text and value within duplicates

    This should do it, however there are duplicate values in Column B. This formula will pull the text associated with the highest number, and the last instance of that number in the list.


    Use Control + Shift + Enter to enter this Array Formula


    Please Login or Register  to view this content.
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  4. #4
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Formula to return the last text and value within duplicates

    (Note: The formula above mine works too, and will pull the first instance in cases where there are multiple matches for Highest Date)

  5. #5
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: Formula to return the last text and value within duplicates

    for some reason the formulas are not working, they just mirror the exact info that I have. love the formulas doh but I would like for the formula to only pull the last first break and the highest time value associated with in the next door column. I only need one first break to be returned with the highest break time recorded.

  6. #6
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: Formula to return the last text and value within duplicates

    Can anyone download the file now? I am using column k which has the duplicates and column c which has the names and column F which has the times.

    Please let me know...I am more than willing to work through this? More than one head can do amazing things

  7. #7
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Formula to return the last text and value within duplicates

    you have to hold Control + Shift will entering my formula, and make sure you modified the ranges in JohnTopley's formula to include the entire data set of your file (his example only runs to row 5)

  8. #8
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: Formula to return the last text and value within duplicates

    I'm not sure what I am doing wrong but its not working. Is it possible you can update the sample file and so I can see where I am going wrong?

  9. #9
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Formula to return the last text and value within duplicates

    I can't upload from the computer I am on at the moment, if you see {}'s around my formula you are doing it right though, if that's the case I am not sure what is wrong

    In the formula bar, it should look like

    {=INDEX(A:A,MAX(--(B:B=MAX(B:B))*ROW(B:B)))}

  10. #10
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: Formula to return the last text and value within duplicates

    The formula works but it just return the wrong results...Its either showing blanks or list all the first break that;s in the column.

  11. #11
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Formula to return the last text and value within duplicates

    Ahhh I gotcha, I misunderstood the requirements.

    I thought you were looking for the text in column A which corresponds with the last-occurance of the largest value in column B - that's what my formula is doing.


    Let me look at this again

  12. #12
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: Formula to return the last text and value within duplicates

    I really appreciate your help on this. my brain is on pause lol

  13. #13
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: Formula to return the last text and value within duplicates

    Hi Speshul any other way i can do this?

  14. #14
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Formula to return the last text and value within duplicates

    I could have a go using a macro, but I do not understand your request.
    Please include a desired result sheet as an attachment.

  15. #15
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    Re: Formula to return the last text and value within duplicates

    Hi AB33, attached is my attachment showing how I would like the results to look after the macro.

    I would like for all the agents statuses with this highest duration to be listed as one instance instead of duplicates as shown in the before macro sheet.

    example:

    one agent may have 5 first break status with the same duration or sometimes with each duration being a second higher than the previous.

    Column 1 Column 2
    First Break 14:00
    First Break 14:01
    First Break 14:02
    First Break 14:03
    First Break 14:04

    I would like for the First Break status with the highest duration be listed as shown in the after macro sheet.
    Attached Files Attached Files

  16. #16
    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
    30,769

    Re: Formula to return the last text and value within duplicates

    VBA solution:

    Please Login or Register  to view this content.

    Click RUN button on tab "After Macro"
    Attached Files Attached Files

+ 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 Help. How can I not return duplicates?
    By mahalek1976 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-09-2016, 05:56 PM
  2. Replies: 6
    Last Post: 07-07-2015, 12:53 PM
  3. Replies: 1
    Last Post: 07-30-2014, 02:37 PM
  4. Formula to find and return text string within a cell full of text strings
    By LightingPop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2013, 11:45 PM
  5. [SOLVED] Array Formula to count specific text ignoring duplicates.
    By JRidge in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 10-07-2013, 05:31 AM
  6. Replies: 7
    Last Post: 10-31-2010, 03:32 PM
  7. Want to return 'TRUE' if text duplicates in multiple cells
    By ddub25 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-11-2007, 08:22 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