+ Reply to Thread
Results 1 to 3 of 3

Comparing 2 rows and posting different values to a third row

  1. #1
    Registered User
    Join Date
    03-09-2018
    Location
    Virginia
    MS-Off Ver
    Microsoft Office 365 ProPlus Version 1708
    Posts
    5

    Question Comparing 2 rows and posting different values to a third row

    Hello,

    I have posted my sample workbook.

    I have a workbook used to track inventory. I'd like to automate the process of comparing the substates from two sources and output the serial numbers which have different substates to a third sheet. I believe it would require the following steps:

    1. Take the serial number column (which is column A) from the sheet "Hardware(Serial Number)", find its matching value in the serial number column (which is column A) from the sheet "Service Now".
    2. Compare the substate column those two rows (columns G and F from their respective sheets)
    3. For any serial number entry where the two substate columns do not match, print the serial number and two substate fields to columns E, F, and G of the "AFTER" sheet.
    4. Repeat until the end of the table is reached.

    Would someone be willing to put that into VBA?
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Comparing 2 rows and posting different values to a third row

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    03-09-2018
    Location
    Virginia
    MS-Off Ver
    Microsoft Office 365 ProPlus Version 1708
    Posts
    5

    Re: Comparing 2 rows and posting different values to a third row

    Thank you very much for your help. I've tested it on a larger document and it looks good!

+ 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] Award values after comparing two rows, avoiding double counting
    By joachimh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-08-2018, 11:07 AM
  2. [SOLVED] Comparing two rows replacing values in columns
    By roshukha in forum Excel General
    Replies: 5
    Last Post: 05-30-2014, 04:18 PM
  3. [SOLVED] How to delete rows based on comparing values in two fields
    By OmniBlue in forum Excel General
    Replies: 5
    Last Post: 09-19-2013, 12:32 PM
  4. Is there a way of comparing text values in rows
    By waivee in forum Excel General
    Replies: 10
    Last Post: 06-26-2012, 01:44 PM
  5. Comparing values in two rows, and move identical rows
    By newyorknix in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2011, 12:14 AM
  6. Grouping rows based on column values and comparing row values
    By bernborough in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2010, 10:18 AM
  7. Comparing Values by Rows
    By akeene in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-16-2007, 08:52 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