+ Reply to Thread
Results 1 to 10 of 10

How to identify two specific values in one column

  1. #1
    Registered User
    Join Date
    03-11-2014
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    7

    How to identify two specific values in one column

    Hi everyone!

    I've got two question on how to 'find' some values in a specific data file, namely:
    1. the '52-Week High' of the share price (highest value of the share in that specific year)
    2. the value of the share price of the last trading day of that specific year (this isn't always 12/31/20..)

    Simplified, my data 'Before' looks as follows: Before.xlsx

    -In column 'A' I've a created a line of unique identifiers (company CUSIP + year -> combined column B and C), in my original set this column consists of 405 companies over 6 years of daily data -> aprox 460000 rows
    -In column 'B' the year is noted
    -In column 'C' the company's CUSIP (identifier for specific company)
    -In column 'D' the date is shown -> its daily trading data
    -In column 'E' name of the company


    My final data set 'After' has to look something like this: After.xlsx

    -In column 'A' the unique identifiers (company CUSIP + year)
    -In column 'B' the year is noted
    -In column 'C' the company's CUSIP (identifier for specific company)
    -In column 'D' name of the company
    -In column 'E' the '52-Week High' of the share price (highest value of the share in that specific year)
    -In column 'F' the value of the share price of the last trading day of that specific year (this isn't always 12/31/20..)

    The big question is how do I manage to identify an link the following data from the 'Before'-sheet to the 'After'-sheet:
    1. '52-Week High' of the share price (highest value of the share in that specific year)
    2. value of the share price of the last trading day of that specific year (this isn't always 12/31/20..)

    Regarding to the '52-Week High' I've already tried with the following functions:
    - VLOOKUP: When I use this one I only get the most upper value, for example in the case of '8668102001' in the sheet 'Before' this would become '13.04'
    - Combined INDEX/MATCH: The same problem as with VLOOKUP
    - IF-function:In this case I get the max value of the entire 'C'-column, in the example of sheet 'Before': this would be '69.86'

    Regarding the value of the share price of the last trading day of a specific year, I couldn't manage to come up with one.

    Since I'm already stuck on the same point because of these problems, I really hope someone could help me with these questions !!

    Regards,
    Floris

    Attachments:
    - Attachment 303689
    - Attachment 303690
    Last edited by FlorisL; 03-11-2014 at 04:41 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How to identify two specific values in one column

    I don't find any workbook in your post.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    03-11-2014
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: How to identify two specific values in one column

    Quote Originally Posted by oeldere View Post
    I don't find any workbook in your post.
    Hi Oeldere!

    -> they're situated in the sentences:
    'Simplified, my data 'Before' looks as follows: Before.xlsx'
    &
    'My final data set 'After' has to look something like this: After.xlsx'

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How to identify two specific values in one column

    See the attached file.

    I made them with an pivot table.

    If you have questions, just ask.

  5. #5
    Registered User
    Join Date
    03-11-2014
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: How to identify two specific values in one column

    Thx Oeldere for your swift reply! The pivot table surely shows the max value per company per year.

    However, because of the fact I'm modifying this data set so I can use it in statistical programs, I wonder if there is a solution to fit/link the requested values from the 'Before'-workbook to the format in the 'After'-workbook?
    Last edited by FlorisL; 03-11-2014 at 04:50 PM.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How to identify two specific values in one column

    Which other data you want to analyze.

    Please also show it in the file.

  7. #7
    Registered User
    Join Date
    03-11-2014
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: How to identify two specific values in one column

    It's an really extensive data file, I'm afraid adding it to the thread it'll only distract from the question at hand.

    I need the data in the specific format as shown in 'After.xlsx' so I can run regressions with the data in EViews.

    Is there a function to substract the required data from the 'Before.xlsx'-workbook to the 'After.xlsx'-workbook in the format of the latter?

    Many thanks for the effort so far

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How to identify two specific values in one column

    Maybe this one could be usefull to you.

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How to identify two specific values in one column

    And maybe this gives you an idea what you can do with excel.

    See the attached file with an pivot table and a graph.

  10. #10
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: How to identify two specific values in one column

    Try these ARRAY formulas in After.xlsx
    In E2
    Please Login or Register  to view this content.
    In F2
    Please Login or Register  to view this content.
    and drag down.
    Both the files should be in same folder.

    To enter ARRAY formula,
    Paste the formula
    Don't Press Enter Key
    Press Ctrl+Shift+Enter Keys together.
    You will see {} around ARRAY formula.

+ 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. Macro to identify column by header and replace number values with string values
    By kang6789 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2013, 05:44 PM
  2. Replies: 1
    Last Post: 09-02-2013, 06:27 AM
  3. Replies: 3
    Last Post: 02-20-2013, 08:54 PM
  4. Replies: 5
    Last Post: 05-09-2012, 02:30 PM
  5. Replies: 1
    Last Post: 05-09-2012, 01:30 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