+ Reply to Thread
Results 1 to 6 of 6

Matching columns and retaining result data

  1. #1
    Registered User
    Join Date
    12-26-2021
    Location
    Swansea
    MS-Off Ver
    2019
    Posts
    2

    Matching columns and retaining result data

    I have a complete list of all sample ID's in column 1.

    Column C shows the samples that have been tested for pH (and thier corresponding result in column D)

    Image_1.jpg

    Column B is a duplicate list which inserts blanks using the following VBA code:


    Please Login or Register  to view this content.
    The question: How do I now get the pH result (column D) to match with its corresponding Sample ID in column A?

    Any help will be greatly appriciated. Many Thanks.
    Last edited by AndyT88; 12-26-2021 at 04:54 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland... but I could be anywhere in the world
    MS-Off Ver
    Office 365 for PC.
    Posts
    33,880

    Re: Matching columns and retaining result data

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, 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

    (Note:since you are new here, I have done it for you... this time.
    Glenn



  3. #3
    Registered User
    Join Date
    12-26-2021
    Location
    Swansea
    MS-Off Ver
    2019
    Posts
    2

    Re: Matching columns and retaining result data

    Hi Glenn. Thank you! and sorry! I shall remember this for next time. I appriciate your help

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland... but I could be anywhere in the world
    MS-Off Ver
    Office 365 for PC.
    Posts
    33,880

    Re: Matching columns and retaining result data

    It's all the help I can give you... as I know nothing about VBA!! I suspect that those who do will need to have a sample sheet... not a picture of one. see yellow banner, top of page.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2010
    Posts
    7,016

    Re: Matching columns and retaining result data

    Try this code.
    Please Login or Register  to view this content.
    k gives the PH value of ID
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365 Win 11 Home 64 Bit
    Posts
    21,335

    Re: Matching columns and retaining result data

    crossposted: https://www.mrexcel.com/board/thread...-data.1191182/
    and https://chandoo.org/forum/threads/ma...lt-data.47352/

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future
    Alan


    Have you debugged your code?
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Replies: 7
    Last Post: 07-09-2019, 03:33 PM
  2. Replies: 6
    Last Post: 01-24-2019, 04:19 AM
  3. Replies: 6
    Last Post: 01-07-2016, 12:03 PM
  4. Matching 2 columns and output result in third column
    By tubells in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-21-2014, 06:47 PM
  5. Replies: 1
    Last Post: 11-05-2012, 12:52 AM
  6. Matching 2 Columns with a Pre-defined 3rd as a Result
    By zeddotes in forum Excel General
    Replies: 4
    Last Post: 11-23-2010, 08:41 PM
  7. Retaining the result of an IF function
    By Jaison1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-09-2008, 05:46 PM

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