+ Reply to Thread
Results 1 to 8 of 8

IF test doesnt work to match data. Any ideas?

  1. #1
    Registered User
    Join Date
    11-07-2011
    Location
    Wisconsin USA
    MS-Off Ver
    Excel 2016
    Posts
    18

    Question IF test doesnt work to match data. Any ideas?

    OK All you excel guru's, here one for you.

    Im building a couple workbooks and need to see what you think is going to be the best FORMULA to use for this. I stress formula because thats where the problem lies. Because of the application im building this for, i cannot use macros or conditional formatting. So here is the 1st problem.

    we'll call the books, book1 and book2.

    I need a range of cells in book2 to look at a range of cells in book1, if any of book2's range of cells finds a match in any of the range of cells in book1, i need it to copy AT LEAST the matching data into a Range of specified cells on book2. I tried this just as it sounds using an IF test but the result was #VALUE!. so unless i didnt code it right, an IF test isnt the way to go. To "dumb it down" to my level, i guess what im trying to do is to search a range of cells for matching data, if it finds a match to that data,i needs it to copy the whole row over to a different workbook. It could need to copy one line, it could be 100 lines. it depends on the wether or not the data is matched.

    OK, i'll let you guys roll that one around in your heads for a while and we'll see what falls out.

    Thanks in advance for the help.
    Last edited by MyComputerGuy; 11-11-2011 at 01:15 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: IF test doesnt work to match data. Any ideas?

    Not very specific on the details, possibly VLOOKUP which can work across workbooks.

    Try attaching example workbooks
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    11-07-2011
    Location
    Wisconsin USA
    MS-Off Ver
    Excel 2016
    Posts
    18

    Re: IF test doesnt work to match data. Any ideas?

    Im not exactly sure how i can get more specific than i was above but i'll try. as far as giving an example book, due to the nature of the data, i cant do that. so let me try to explain a little better.

    i have 2 workbooks that im working with. In each of the workbooks there is a common column called SKU. This "SKU" number is a number that is entered by a barcode reader and is already set up in book2 on a different sheet under the same heading. What i need to happen is on the second sheet of the same workbook, when the barcode is scanned by the user, i need excel to go to the first sheet, search the "SKU" column, if it finds a match in a range of cells, i want it to copy the whole row of data that was matched by the "SKU" to the second sheet into the "next availble row" so to speak.

    So in a nutshell, this is what i need. I scan a barcode, which comes out as numbers, into a cell on sheet2, lets call that B1, that number that is entered by the scanner is compared to numbers on sheet1 in the range of lets say A2:500-J2:J500, if the number scanned matchs any of the numbers in the "SKU" column, which is C2:C500 by the way, i want all the cells in that row to be copied to sheet2 on the first availble line under a header that has the same structure as sheet1. I then enter another scanned barcode into the same B1cell and the process starts over entering the set of cells into the "next available line under the last entry". Hopefully this gives you a little better look at what im trying to do. Keep in mind that macros and conditional formatting cannot be used in this application.

    By the way, the only reason i mention the 2 workbooks is for clarifacation purpose only that there are 2 workbooks in this project that work together. This specific problem will not effect the 2nd workbook. Or should'nt anyway.

    Thanks for taking the time to look,
    Last edited by MyComputerGuy; 11-12-2011 at 11:39 AM.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,526

    Re: IF test doesnt work to match data. Any ideas?

    I think you would need VBA for this. If a formula based solution could be developed, any values would be replaced when the "lookup" value was change.

    It's extremely difficult to come up with any kind of a solution without seeing the structure of the workbook and the worksheet and some examples of the data, albeit not live or sensitive data.


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Registered User
    Join Date
    11-07-2011
    Location
    Wisconsin USA
    MS-Off Ver
    Excel 2016
    Posts
    18

    Re: IF test doesnt work to match data. Any ideas?

    OK.... i tried to "Throw" together an example for you. See if this helps.
    Attached Files Attached Files

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,526

    Re: IF test doesnt work to match data. Any ideas?

    I've put some formulae into the sheet.

    Unfortunately, I can think of no way of being able to update a single cell and populate the "next" row without using VBA.

    You could, perhaps, have a Data Validation list for each of the SKUs and drag down the formulae.

    Different approach; see the example: sheet3 (DV)


    Regards, TMS
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-07-2011
    Location
    Wisconsin USA
    MS-Off Ver
    Excel 2016
    Posts
    18

    Re: IF test doesnt work to match data. Any ideas?

    Thats a fair approach, unfortunatly, there are literally thousands of SKU's and they may change and/or the list could grow with new entries. That was the next problem that i needed to address. (if no data was matched, then provide a row for entry) looks like i may need to look into a different platform to run this under inorder to use VBA. I may have to rethink this project and its scope.

    Thanks for trying

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,526

    Re: IF test doesnt work to match data. Any ideas?

    The SKUList is a dynamic name range, so if you add entries to sheet1, it will cope with that and they will be added to your Data Validation list.

    To be able to enter a SKU in cell B4 and it transfer data from the "master" list and add it to the bottom (or top) of another list will require VBA.

    Good luck with whatever approach you choose to adopt.

    Regards, TMS

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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