+ Reply to Thread
Results 1 to 3 of 3

Code to return the 2nd highest value from each tab of another workbook to current workbook

  1. #1
    Registered User
    Join Date
    03-01-2017
    Location
    State College, PA
    MS-Off Ver
    2013
    Posts
    7

    Code to return the 2nd highest value from each tab of another workbook to current workbook

    Hello! I'm extremely new to macros and codes and have only run a few successfully. I apologize for any glaring mistakes!

    I'm trying to come up with a code to return the 2nd highest value from the "D" column of each tab of another workbook to my current workbook. Please see my code below. I pieced it together from other codes that I've used in the past and another code that I found online. I keep getting errors left and right when I try to alter the code. When I try to use the one below, I get a "Compile Error: Type Mismatch" popup. Can anyone help me fix this code/come up with a better one? Thank you!


    Please Login or Register  to view this content.
    Last edited by craftyocelot; 03-02-2017 at 09:57 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Code to return the 2nd highest value from each tab of another workbook to current work

    Sorry Friend.

    Welcome to the forum.

    You have breached one of our forum rules and so you will get few responses.

    In the meantime. Consider using the Excel "Large" Function to find the second largest value in column D.
    I cannot post sample code until you edit your post to include the code tags.



    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between
    Please Login or Register  to view this content.
    tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Last edited by mehmetcik; 03-01-2017 at 06:34 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    03-01-2017
    Location
    State College, PA
    MS-Off Ver
    2013
    Posts
    7

    Re: Code to return the 2nd highest value from each tab of another workbook to current work

    Sorry about that! I've added the code tags.

+ 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. In Current workbook- copy sheets from other workbooks and save in current workbook
    By johnnywinter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2016, 08:41 PM
  2. VBA code to copy data from current workbook to another workbook and send email
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-05-2015, 06:47 AM
  3. [SOLVED] Opening new workbook and pasting values into current workbook - code issues
    By Stew1234 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-15-2014, 07:56 AM
  4. [SOLVED] Code to detect previous active workbook instead of current active workbook
    By kosherboy in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-25-2014, 01:58 AM
  5. Replies: 9
    Last Post: 07-27-2012, 06:16 AM
  6. Code to open a workbook , copy info and return it to another workbook using a cell v.
    By england79m in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2008, 11:22 AM
  7. [SOLVED] Place code from current workbook to new workbook
    By Qaspec in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-08-2005, 11:05 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