+ Reply to Thread
Results 1 to 2 of 2

Macro that copies maximum value from list

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    Greenland
    MS-Off Ver
    Excel 2007
    Posts
    1

    Macro that copies maximum value from list

    Hi

    I need to make a macro that does the following three things:

    1. Go through a range of cells. Find the maximum value in the range of cells. Copy the maximum value to another location on the worksheet. From the location of the maximum value, copy the value of the cell that is in the same row, but a different column.

    I have data for conductance and time. I wish to find the maximum conductance, and the corresponding time at which the maximum conductance is attained.

    2. As well, in the same list of data, there is a sudden drop in conductance. I wish to find the time at which this sudden drop happens.

    3. I need to find the difference in time between when the maximum conductance data point is reached, and the time when it suddenly drops.

    Does anyone know how I could go about doing this? Thanks

    Regards,

    Nick

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro that copies maximum value from list

    1a) Use a MAX formula to find the max value in that column.
    =MAX(C:C)

    1b) Get the matching value from column B, for instance:
    =INDEX(B:B, MATCH(MAX(C:C), C:C, 0))

    2) & 3) Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Manually mockup the results desired from the sample data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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