+ Reply to Thread
Results 1 to 21 of 21

Excel Formula/function help needed

  1. #1
    Registered User
    Join Date
    08-30-2020
    Location
    Texas
    MS-Off Ver
    365
    Posts
    16

    Excel Formula/function help needed

    I need to build a formula to catch dates needed from the first tab/worksheet that has multiple dates for each person. Each field in the second tab requires data that pertains to the Old date and the new date (in the first tab it is current dates and the one prior to the current Date).

    I am using SSN # as my unique ID to vlookup the old and the new dates but some SSN’s have multiple dates and I don’t know how to catch only the current and the date prior to the current. Any suggestions? Thank you
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Excel Formula/function help needed

    So which of the dates you want to leave? and which to eliminate?
    can you please fill in few lines manually to understand your request?

    Thanks.

  3. #3
    Registered User
    Join Date
    08-30-2020
    Location
    Texas
    MS-Off Ver
    365
    Posts
    16
    Quote Originally Posted by belinda200 View Post
    So which of the dates you want to leave? and which to eliminate?
    can you please fill in few lines manually to understand your request?

    Thanks.
    Hi Belinda,

    The dates that I need are the newest and the second newest. They are “effective dates” so anything before them are irrelevant. We know that the ones ending in 2039 are the newest but I don’t know what formula would detect the previous date. Sort maybe?

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Excel Formula/function help needed

    Can you fill in part of the table manually to understand what you're aiming for?

  5. #5
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Excel Formula/function help needed

    Maybe something like that?

    In column A:
    =IFERROR(INDEX('extracted from Database'!$A$1:$A$15,AGGREGATE(15,6,(ROW('Final Report'!$A$2:$A$15)/(MATCH('extracted from Database'!$A$2:$A$15,'extracted from Database'!$A$2:$A$15,0)=ROW('extracted from Database'!$A$1:$A$15))),ROWS($J$1:J1))),"")


    In P and drag to Q:
    =INDEX('extracted from Database'!K$1:K$15,AGGREGATE(15,6,(ROW('extracted from Database'!$A$2:$A$15))/('Final Report'!$A2='extracted from Database'!$A$2:$A$15),1))

    In R and drag to S:
    =INDEX('extracted from Database'!K$1:K$15,AGGREGATE(14,6,(ROW('extracted from Database'!$A$2:$A$15))/('Final Report'!$A2='extracted from Database'!$A$2:$A$15),1))
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-30-2020
    Location
    Texas
    MS-Off Ver
    365
    Posts
    16
    Quote Originally Posted by belinda200 View Post
    Maybe something like that?

    In column A:
    =IFERROR(INDEX('extracted from Database'!$A$1:$A$15,AGGREGATE(15,6,(ROW('Final Report'!$A$2:$A$15)/(MATCH('extracted from Database'!$A$2:$A$15,'extracted from Database'!$A$2:$A$15,0)=ROW('extracted from Database'!$A$1:$A$15))),ROWS($J$1:J1))),"")


    In P and drag to Q:
    =INDEX('extracted from Database'!K$1:K$15,AGGREGATE(15,6,(ROW('extracted from Database'!$A$2:$A$15))/('Final Report'!$A2='extracted from Database'!$A$2:$A$15),1))

    In R and drag to S:
    =INDEX('extracted from Database'!K$1:K$15,AGGREGATE(14,6,(ROW('extracted from Database'!$A$2:$A$15))/('Final Report'!$A2='extracted from Database'!$A$2:$A$15),1))
    Awesome let me try it, this is really what I needed the built of a function to get me going. I’ll be in touch Belinda

  7. #7
    Registered User
    Join Date
    08-30-2020
    Location
    Texas
    MS-Off Ver
    365
    Posts
    16

    Re: Excel Formula/function help needed

    Belinda what is the 15, 6 on the formula? AGGREGATE(15,6,(ROW

  8. #8
    Registered User
    Join Date
    08-30-2020
    Location
    Texas
    MS-Off Ver
    365
    Posts
    16
    Quote Originally Posted by rosafranco View Post
    Belinda what is the 15, 6 on the formula? AGGREGATE(15,6,(ROW
    Belinda I figured it out and your formulas worked! Thank you, and I’m hoping we can stay in touch. I see you’re from Texas so am I. Excel is quite fun and for people like you that are so knowledgeable I like to keep around. Thank you again

  9. #9
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Excel Formula/function help needed

    Near Texas....From Israel

    You're welcome.

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Excel Formula/function help needed

    crossposted: https://www.mrexcel.com/board/thread...2#post-5547358

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  11. #11
    Registered User
    Join Date
    08-30-2020
    Location
    Texas
    MS-Off Ver
    365
    Posts
    16
    Quote Originally Posted by belinda200 View Post
    Maybe something like that?

    In column A:
    =IFERROR(INDEX('extracted from Database'!$A$1:$A$15,AGGREGATE(15,6,(ROW('Final Report'!$A$2:$A$15)/(MATCH('extracted from Database'!$A$2:$A$15,'extracted from Database'!$A$2:$A$15,0)=ROW('extracted from Database'!$A$1:$A$15))),ROWS($J$1:J1))),"")


    In P and drag to Q:
    =INDEX('extracted from Database'!K$1:K$15,AGGREGATE(15,6,(ROW('extracted from Database'!$A$2:$A$15))/('Final Report'!$A2='extracted from Database'!$A$2:$A$15),1))

    In R and drag to S:
    =INDEX('extracted from Database'!K$1:K$15,AGGREGATE(14,6,(ROW('extracted from Database'!$A$2:$A$15))/('Final Report'!$A2='extracted from Database'!$A$2:$A$15),1))
    Hi Belinda,

    I need your help with columns C-K. I need the data that is consistent and pertains to the old dates and the new dates pulled in from the “extracted from database” worksheet. Can you please help me? Thank you

  12. #12
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Excel Formula/function help needed

    Hi,
    C-K should be a simple vlookup.

    This if for B-F, drag down and across
    =VLOOKUP($A2,'extracted from Database'!$A:$F,COLUMNS($C$1:D1),0)

    I dont know where do you want to extract the data for G-K.

  13. #13
    Registered User
    Join Date
    08-30-2020
    Location
    Texas
    MS-Off Ver
    365
    Posts
    16
    Quote Originally Posted by belinda200 View Post
    Hi,
    C-K should be a simple vlookup.

    This if for B-F, drag down and across
    =VLOOKUP($A2,'extracted from Database'!$A:$F,COLUMNS($C$1:D1),0)

    I dont know where do you want to extract the data for G-K.
    I tried B-F but remember the “extracted from database” worksheet has duplicates so I need the data consistent with the old dates and the new dates on columns P-S on the “final report” worksheet

  14. #14
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Excel Formula/function help needed

    Oh right, forgot that

    Let me check and get back to you.
    (BTW - please dont quote others when you post a message, the moderators dont like it, and it just floods the thread unnecessarily. Thanks.)

  15. #15
    Registered User
    Join Date
    08-30-2020
    Location
    Texas
    MS-Off Ver
    365
    Posts
    16
    Quote Originally Posted by belinda200 View Post
    Oh right, forgot that

    Let me check and get back to you.
    (BTW - please dont quote others when you post a message, the moderators dont like it, and it just floods the thread unnecessarily. Thanks.)
    Ok thank you, I’m new so I must of accidentally quote 😃

  16. #16
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Excel Formula/function help needed

    dont press - " Reply With Quote"

  17. #17
    Registered User
    Join Date
    08-30-2020
    Location
    Texas
    MS-Off Ver
    365
    Posts
    16

    Re: Excel Formula/function help needed

    Oh ok! I think I got it now

  18. #18
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Excel Formula/function help needed

    Sorry I review now your request and my suggestion and I see that it's all wrong.

    I know how to extract only the NEW information, but the old is more complicated as you need to return the minimum value in an array formula that has zeros so the value returned will be zero and not the requested date.
    Anyway-

    In R2 and drag to S2 and down - Aray formula**
    =LARGE(IF($A2='extracted from Database'!$A$2:$A$15,'extracted from Database'!K$2:K$15),1)

    In G2 through K2 and down - Aray formula**:
    =INDEX('extracted from Database'!B$1:B$15,SMALL(IF(($A2='extracted from Database'!$A$2:$A$15)*('Final Report'!$R2='extracted from Database'!$K$2:$K$15)*('Final Report'!$S2='extracted from Database'!$L$2:$L$15),ROW('extracted from Database'!$B$2:$B$15)),1))

    **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).
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    08-30-2020
    Location
    Texas
    MS-Off Ver
    365
    Posts
    16

    Re: Excel Formula/function help needed

    hi Belinda, that is great! It works. Thank you! For the "Old Dates" we did use the right formula to bring it in from the "extracted from Database" worksheet and so far they are correct on columns P-Q.
    That formula we used for column P-Q was: =INDEX('extracted from Database'!K$1:K$15,AGGREGATE(15,6,(ROW('extracted from Database'!$A$2:$A$15))/('Final Report'!$A2='extracted from Database'!$A$2:$A$15),1))
    Now I just need the data that pertains to those dates to fill in columns C-F.

    I attached a revised one as a sample.
    Attached Files Attached Files

  20. #20
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Excel Formula/function help needed

    Ok, if you are fine with that (but remember I warned you )

    Use this in C-F:
    =INDEX('extracted from Database'!C$1:C$10,AGGREGATE(15,6,(ROW('extracted from Database'!$B$1:$B$10)/('Final Report'!$P2='extracted from Database'!$K$1:$K$10)*('Final Report'!$Q2='extracted from Database'!$L$1:$L$10)),1))

  21. #21
    Registered User
    Join Date
    08-30-2020
    Location
    Texas
    MS-Off Ver
    365
    Posts
    16

    Re: Excel Formula/function help needed

    Thank you Belinda! You’re the best!

+ 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. Which formula/function is needed for this?
    By DanielJHughes in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-04-2016, 12:15 PM
  2. IF function formula needed
    By Rosco88 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-19-2014, 09:54 AM
  3. Function or formula needed
    By Ron Coderre in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 10:05 AM
  4. [SOLVED] Function or formula needed
    By Ron Coderre in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 06:05 AM
  5. [SOLVED] Function or formula needed
    By CindyH in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  6. [SOLVED] Function or formula needed
    By CindyH in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  7. Function or formula needed
    By CindyH in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 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