+ Reply to Thread
Results 1 to 11 of 11

search the Max Valeu in the Column J

  1. #1
    Registered User
    Join Date
    02-08-2017
    Location
    Stuttgart
    MS-Off Ver
    MS2010
    Posts
    6

    search the Max Valeu in the Column J

    Hi everybody
    i need you help and my question is:
    i will to implement a vba code which
    search the Max Value in the Column J und write the related Value in the Column B in Cell K25

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,913

    Re: search the Max Valeu in the Column J

    You'll need to give bit more detail.

    Is there chance of duplicate Max value in J? If so how should tie be handled?

  3. #3
    Registered User
    Join Date
    02-08-2017
    Location
    Stuttgart
    MS-Off Ver
    MS2010
    Posts
    6

    Re: search the Max Valeu in the Column J

    no we will have only one Max in J

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,913

    Re: search the Max Valeu in the Column J

    Something like below. Assuming Row 1 contains headers.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-08-2017
    Location
    Stuttgart
    MS-Off Ver
    MS2010
    Posts
    6

    Re: search the Max Valeu in the Column J

    hi,
    i geht an Error by executing this code

    Range("K25").Value = Cells(iRow, 2).Value doesnīt work

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,913

    Re: search the Max Valeu in the Column J

    Upload sample workbook. Works without issue on my end.

  7. #7
    Registered User
    Join Date
    02-08-2017
    Location
    Stuttgart
    MS-Off Ver
    MS2010
    Posts
    6

    Re: search the Max Valeu in the Column J

    the Values in E are a Parable coordinate, because date i want to search the isge Point in E and Then i subtract 10, that means i will have 2 Points in this graph.
    i will get the Related Value for these 2 point from column B.

    how can i attached the File?

  8. #8
    Registered User
    Join Date
    02-08-2017
    Location
    Stuttgart
    MS-Off Ver
    MS2010
    Posts
    6

    Re: search the Max Valeu in the Column J

    the Values in E according to B are a Parable coordinate, because that i want to search the Peak Point in E and Then i subtract 10, that means i will have 2 Points in this graph.
    i will get the Related Values for these 2 point in column B.
    Max = -2,37
    Max -10 = -12,37
    i will search Value in E ,if i donīt find it then the next closest one due the symmetry of the Graph, i want to find 2 Values closest to -12,37.
    after that to find the related values for this two Value in B and edit this Values in F
    Attached Files Attached Files

  9. #9
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,913

    Re: search the Max Valeu in the Column J

    Umm, you had column "J" in original post... and since starting value for iMax was set at 0 in code. Negative values would have given error.

    And logic is quite a departure from original request of finding MAX in J and corresponding value in B.

    What's your expected values in F? Can you give some sample manually?

    And define closest to -12.37. Is it absolute variance from -12.37 you are looking for? Or does result need to be value smaller than -12.37 (or greater than)?

  10. #10
    Registered User
    Join Date
    02-08-2017
    Location
    Stuttgart
    MS-Off Ver
    MS2010
    Posts
    6

    Re: search the Max Valeu in the Column J

    Umm, you had column "J" in original post... and since starting value for iMax was set at 0 in code. Negative values would have given error.

    And logic is quite a departure from original request of finding MAX in J and corresponding value in B.

    What's your expected values in F? Can you give some sample manually?

    And define closest to -12.37. Is it absolute variance from -12.37 you are looking for? Or does result need to be value smaller than -12.37 (or greater than)?

    Hi CK76,
    thank you for your help,
    at the beginning i want have only one example,which i can used to help me for the implemnation the codei .
    i want to use the column F to edit the edit the Values,which i search it in the E and B .
    the Values should be greater than -12.37 and their related Value in B .

  11. #11
    Registered User
    Join Date
    02-08-2017
    Location
    Stuttgart
    MS-Off Ver
    MS2010
    Posts
    6

    Re: search the Max Valeu in the Column J

    Hi CK76,
    thank you for your help,
    at the beginning i want have only one example,which i can used to help me for the implemnation the codei .
    i want to use the column F to edit the edit the Values,which i search it in the E and B .
    the Values should be greater than -12.37 and their related Value in B .

  12. #12
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,913

    Re: search the Max Valeu in the Column J

    For finding Max my original code with minor modification will work.

    Please Login or Register  to view this content.
    Alternately you can just use something like....
    Please Login or Register  to view this content.
    Then find the match in Column B.

    As for the rest. Not sure what you mean by following.
    i want to use the column F to edit the edit the Values,which i search it in the E and B

+ 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. Simple search box column and retrive results to search box sheet
    By Tanakaka in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-08-2017, 08:47 AM
  2. Search column for string and date then search adjacent cell and pop up message
    By ftwobtwo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2014, 09:55 AM
  3. [SOLVED] Search within a column and repeat the search until all items are found
    By RANDY LIPOSKY in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-09-2014, 10:23 AM
  4. [SOLVED] Match search terms, and add data in next column. Multi search problem.
    By Wales MB in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-23-2013, 06:10 PM
  5. Replies: 4
    Last Post: 12-21-2012, 10:35 AM
  6. [SOLVED] Search in a row for a column number after a Vlookup search.
    By Fiebuls in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-11-2012, 04:25 AM
  7. Replies: 1
    Last Post: 07-26-2011, 06:48 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