+ Reply to Thread
Results 1 to 9 of 9

Need to make a macro to find values in a table column, pictures included

  1. #1
    Registered User
    Join Date
    07-20-2017
    Location
    Allentown, Pennsylvania
    MS-Off Ver
    Excel 2016
    Posts
    4

    Need to make a macro to find values in a table column, pictures included

    This is my first post here, please be gentle

    I need to make a VBA macro to search through a table column and find values that are greater than the value of a single-cell named range (my threshold in this case). Once I've found a match I need to copy the contents of a cell on the same row from the Dest. Handling Unit column as the match to the HU column of the second table.

    Part of the complication of this macro (for me at least) is that I need the results to be put in the output column one after another, not just written over and over in the first cell of the column.

    I've provided pictures of the two tables below.



    My source columns Imgur: http://imgur.com/Mg2cU3R
    My output columns Imgur: http://imgur.com/CcVFhap

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need to make a macro to find values in a table column, pictures included

    A spreadsheet is worthy. Pictures don't do much. Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    07-20-2017
    Location
    Allentown, Pennsylvania
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Need to make a macro to find values in a table column, pictures included

    Thanks very much for your prompt response.

    I've attached a workbook as you requested with a before and after that to illustrate what I am trying to achieve.
    Attached Files Attached Files

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need to make a macro to find values in a table column, pictures included

    Try this:

    Please Login or Register  to view this content.
    Last edited by xladept; 07-20-2017 at 05:01 PM.

  5. #5
    Registered User
    Join Date
    07-20-2017
    Location
    Allentown, Pennsylvania
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Need to make a macro to find values in a table column, pictures included

    That seems to sort of work, thanks!

    Would you mind helping me read your code so I can adjust it to work on my full project?

    From what I can tell the colons act as line breaks and T is the threshold that will ignore anything below it. I understand the "If Then" portion of the code but most of the rest of it is tough for me to figure out, obviously I'm new to VBA.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need to make a macro to find values in a table column, pictures included

    Here's a single column on the after sheet:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-20-2017
    Location
    Allentown, Pennsylvania
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Need to make a macro to find values in a table column, pictures included

    Thanks, this is exactly what I was looking for.

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need to make a macro to find values in a table column, pictures included

    You're welcome and thanks for the rep!

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need to make a macro to find values in a table column, pictures included

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Urgent Help: Find if any of the two values is included in a range of cell
    By faizzsheikh in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-19-2013, 09:49 AM
  2. Filtering By Values In Pivot Table (pic included)
    By no.18shirt in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-11-2013, 06:02 PM
  3. Filtering By Values In Pivot Table (pic included)
    By no.18shirt in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-11-2013, 04:56 PM
  4. Find duplicate values in a column, make each value unique.
    By jobell in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2012, 12:15 PM
  5. Replies: 1
    Last Post: 09-11-2009, 08:01 AM
  6. Replies: 1
    Last Post: 01-16-2008, 03:38 AM
  7. how do i change or make this macro??? pictures and code included
    By dispelthemyth in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2006, 10:00 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