+ Reply to Thread
Results 1 to 15 of 15

Get Max and Min value for Selective date

  1. #1
    Registered User
    Join Date
    01-04-2015
    Location
    Chennai India
    MS-Off Ver
    2010
    Posts
    17

    Get Max and Min value for Selective date

    Hi
    I am having excel work book with two sheets Nifty and KEY
    In My workbook nifty price is be available for every min in NIFTY sheet. I want particulate dates High
    Eg: Get 10 Aug 2015 High nifty price from NIFTY sheet, after getting days high value I need to get corresponding Open,Close,Low,High in KEY sheet ROW 6.
    Respectively I want to get for Low also. Date want to get from KEY sheet "B2" .

    Currently I am Filtering Respective date and then sorting high to low value for High value and lowest to high for Low value and then I am copy pasting into KEY sheet this took lots of time. Kindly help to solve this using VBA.

    I have given the excel sheet with exact data.

    NIFTY.xlsx
    Last edited by barathsoft; 08-12-2015 at 05:11 AM.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Get Max and Min value for Selective date

    Hi try these array formulas in the attachment
    In E6
    Please Login or Register  to view this content.
    In E7
    Please Login or Register  to view this content.
    then in B6
    Please Login or Register  to view this content.
    As for other cells just copy the formula in B6 and select other cells (B7 - C6:D7 - F6:G7) and right click then paste special and select formulas
    Attached Files Attached Files
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Registered User
    Join Date
    01-04-2015
    Location
    Chennai India
    MS-Off Ver
    2010
    Posts
    17

    Re: Get Max and Min value for Selective date

    Hi Yaseer

    Formula is working for 10th AUG perfectly, But in 11th AUG the high value from formula is different from the manually sorted high value.
    and
    How to customize this formula for more data (sample excel contains 4days data maximum it will have 15days data)

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Get Max and Min value for Selective date

    The formula is working good I tested it with 11th Aug ..
    In NIFTY filtered data based on the date 11th Aug the sort the data based on column E and I got the same results for highest and lowest value

    To customize the formmula just change the end of the ranges e.g repalce 1400 with 2000 in all the formulas and don't forget to press Ctrl + Shift + Enter as these are array formulas

  5. #5
    Registered User
    Join Date
    01-04-2015
    Location
    Chennai India
    MS-Off Ver
    2010
    Posts
    17

    Re: Get Max and Min value for Selective date

    Quote Originally Posted by YasserKhalil View Post
    The formula is working good I tested it with 11th Aug ..
    In NIFTY filtered data based on the date 11th Aug the sort the data based on column E and I got the same results for highest and lowest value

    To customize the formmula just change the end of the ranges e.g repalce 1400 with 2000 in all the formulas and don't forget to press Ctrl + Shift + Enter as these are array formulas
    But I am not getting correct value, could you please check the problem in the excel sheet
    NIFTY.xlsx

    Is it possible to remove Row with Time 9:15

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Get Max and Min value for Selective date

    The file is ok for me again
    You filter data based on date ok .. then select filtered date and sort data based on Column E

    My results are correct exactly as the data appeared in NIFTY sheet

  7. #7
    Registered User
    Join Date
    01-04-2015
    Location
    Chennai India
    MS-Off Ver
    2010
    Posts
    17

    Re: Get Max and Min value for Selective date

    Could you say what your getting for high?
    For Low the values are correct but for high formula getting 11 AUG 2015 9:15 data as HIGH. By sorting I am getting 11 AUG 2015 9:16 as High Sorry For troubling Could you explain this because once I entered the formula even 0.5 data mismatch cause a big difference in Final Output. This Sheet is for STOCK market. Kindly help me.

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Get Max and Min value for Selective date

    It seems that I missed something ..
    I don't know about stock ..so I didn't realize you sort for high based on column E but for low based column D
    Here's the correction
    Attached Files Attached Files
    Last edited by YasserKhalil; 08-13-2015 at 02:59 AM.

  9. #9
    Registered User
    Join Date
    01-04-2015
    Location
    Chennai India
    MS-Off Ver
    2010
    Posts
    17

    Re: Get Max and Min value for Selective date

    Quote Originally Posted by YasserKhalil View Post
    It seems that I missed something ..
    I don't know about stock ..so I didn't realize you sort for high based on column E but for low based column D
    Here's the correction
    Hi Yasser

    Thank You So much You have given me the correct solution.

  10. #10
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Get Max and Min value for Selective date

    You're welcome
    Thanks for the feedbakck and for the rep. points
    Regards

  11. #11
    Registered User
    Join Date
    01-04-2015
    Location
    Chennai India
    MS-Off Ver
    2010
    Posts
    17

    Re: Get Max and Min value for Selective date

    Hi Yaseer

    There is an issue in finding Max and Min not getting data. I am not sure where is the issue. I have attached the excel sheet could please help me.

    Error.xlsm

  12. #12
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Get Max and Min value for Selective date

    Hi barathsoft
    Can you specify exactly where is the error you mean and the expected results?

  13. #13
    Registered User
    Join Date
    01-04-2015
    Location
    Chennai India
    MS-Off Ver
    2010
    Posts
    17

    Re: Get Max and Min value for Selective date

    Hi Yasheer
    Sorry.....!
    In KEY Sheet B2 is for day one and j2 is for Day two these two tables is for stock to find open close High Low and date. B4,B5,B8 will be inserted using macro. B6 and B7 will get date using index match which is suggested by you. B12 and J12 table will get date from stock and it will do Vlookup for that particular date for NIFTY. like this I am calculating for last two days data for my calculation.same calculation I added for two more days B20 and J20 tables also B38 and J38. currently I am not getting high and Low value for some dates. Problem may be with DL or Range in formula but I could spot the error. I am having problem in Row 6, 7, 24, 25, 42, 43 to find the min and max value. One more think each time I am running my macro DL data range may differ is that also a problem, I kept default range as 5400 in your formula. If you need any clarification ask me please.

    This formula worked for more than 10 days data. After changing the data in DL problem started. which means when i updated DL data everything went wrong.

    Help me yasheer
    Last edited by barathsoft; 08-23-2015 at 05:09 AM.

  14. #14
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Get Max and Min value for Selective date

    I think it would be better to present this issue in another thread and give more details and attach your file with expected results..
    I am sure you will find assistance

  15. #15
    Registered User
    Join Date
    01-04-2015
    Location
    Chennai India
    MS-Off Ver
    2010
    Posts
    17

    Re: Get Max and Min value for Selective date

    Thank you Yaseer

+ 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] Find date/day across columns and update selective cell below
    By emina002 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-15-2015, 01:08 PM
  2. Selective row deletion
    By Pablo14 in forum Excel General
    Replies: 7
    Last Post: 09-30-2014, 10:33 AM
  3. [SOLVED] Selective Ranking
    By ruvster in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-13-2013, 01:40 PM
  4. Selective Transpose
    By rkgautam in forum Excel General
    Replies: 4
    Last Post: 05-30-2013, 02:27 PM
  5. [SOLVED] Selective SUM
    By bryan444 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-11-2013, 01:24 PM
  6. Replies: 5
    Last Post: 12-11-2012, 05:04 AM
  7. Selective Query
    By ChipRivers in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-23-2008, 07:54 AM

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