+ Reply to Thread
Results 1 to 2 of 2

Comparison of a set range of columns on the same sheet to insert correct image on userform

  1. #1
    Registered User
    Join Date
    10-25-2011
    Location
    Des Moines, Iowa
    MS-Off Ver
    Excel 2007
    Posts
    18

    Question Comparison of a set range of columns on the same sheet to insert correct image on userform

    **Attached is the workbook. Macro "CheckLocation".. run with no "Sheet2" (macro creates it)

    Userform labeled "UserForm1"

    I don't even know if this is possible....I have no idea how to code a comparison of a set range of columns with another range of columns and then flag the rows with differences to insert an image in a frame on the userform for that location. Currently the userform displays a "deck layout" for loading dna plates. Each location is labeled on this userform with a frame.

    i.e. DNA1 - first location / frame1
    DNA2 - second location / frame2

    There are a total of (8) DNA locations/frames and (6) PCR locations/frames.

    In my active.worksheet (Sheet2), there are rows of data formatted from Sheet(1) by this macro. The userform (Userform1) has (4) textboxes to input the corresponding data into each locations matching row.

    Macro formatted rows:

    PCRLocation PCR Plate ID Source ID Offset DNASource ID
    PCR1 119416 J93174_001 1 DNA1
    PCR1 119416 J93174_001 2 DNA1
    PCR1 119416 J93174_001 3 DNA1
    PCR1 119416 J93174_002 4 DNA2
    PCR2 119417 J93174_002 1 DNA2
    PCR2 119417 J93174_002 2 DNA2
    PCR2 119417 J93174_003 3 DNA3
    PCR2 119417 J93174_003 4 DNA3
    PCR3 119418 J93174_003 1 DNA3
    PCR3 119418 J93174_004 2 DNA4
    PCR3 119418 J93174_004 3 DNA4
    PCR3 119418 J93174_004 4 DNA4
    PCR4 119419 J93174_005 1 DNA5
    PCR4 119419 J93174_005 2 DNA5
    PCR4 119419 J93174_004 3 DNA4
    PCR4 119419 J93174_006 4 DNA6
    PCR5 119420 J93174_006 1 DNA6
    PCR5 119420 J93174_006 2 DNA6
    PCR5 119420 J93174_007 3 DNA7
    PCR5 119420 J93174_007 4 DNA7
    PCR6 119421 J93174_007 1 DNA7
    PCR6 119421 J93174_008 2 DNA8
    PCR6 119421 J93174_008 3 DNA8
    PCR6 119421 J93174_008 4 DNA8


    Userform1's textboxes are saving the data to columns in this format right next to the last column shown above. So, repeating the exact information next to it.
    First group: "A","E" Second group: "F","J"

    If say, column "B" / "PCR Plate ID" has 119416 shown on the left side and the user inputs into the userform 119417 (saved into column "G" on same sheet), the macro would highlight the row and insert an image into the associated frame on the userform to visually notify the user that the PCR Plate and associated DNA plate are incorrect and need to be reloaded.

    If say, all cells in the row match, the macro would then insert an image into the frame visually showing that location is good.

    Is this even possible?! HELP!!

    Code I have for this is below:

    Formatting Macro:
    Please Login or Register  to view this content.
    Code for the Userform:

    Please Login or Register  to view this content.

    Thanks for looking at my hurddle!

    J.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-25-2011
    Location
    Des Moines, Iowa
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Comparison of a set range of columns on the same sheet to insert correct image on user

    I am not even sure if this is possible.. if anyone knows that would be helpful. I don't want to spend too much time on this if it isn't possible.
    Thanks.

+ 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