+ Reply to Thread
Results 1 to 6 of 6

Need formula to query an array and return a value

  1. #1
    Registered User
    Join Date
    08-28-2009
    Location
    MI
    MS-Off Ver
    Excel 2007
    Posts
    3

    Need formula to query an array and return a value

    I am an extreme beginner when it comes to Excel programming, so I was wondering if someone could help me.

    I am getting a CSV file from a web site which has columns of text values. Let's say one has A-Z. I have a worksheet that has 2 columns where if a1 is the value A, A2 is Andrew, b1 = B, b2 = Bob, c1 = C, c2 = Charlie, etc. I need a formula that will read the values that come in a column of the CSV file, compare them to my list in the worksheet, and return the value in the column next the list of A-Z. They're actually product SKUs and descriptions, I've attached a jpg that might help describe what I'm trying to do.

    Any help or pointers would be greatly appreciated.

    Thanks!
    Attached Images Attached Images

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Need formula to query an array and return a value

    Your above description and the attachment don't correlate as far as I can tell...

    Where are the items in column B of your worksheet coming from?

    Better to attach an actual excel workbook sample rather than jpg image
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    08-28-2009
    Location
    MI
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Need formula to query an array and return a value

    Thanks for the response.

    I have one spreadsheet (worksheet?) where column A is an SKU and column B is a description of the product. There are 1,100 rows in that sheet.

    Then I download orders from a web site as a CSV where I get the SKUs, but not the product description. I want to scan the 1,100 rows, find the matching description and place it in a column on the CSV file.

    The attached file has 2 worksheets. The first is a sample CSV download from the site, the second is a page from the product list. The lines in red show the data I am trying to draw.

    Thanks again for offering your expertise on this.
    Attached Files Attached Files

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Need formula to query an array and return a value

    K2: =VLOOKUP(H2,'Product Description List'!$A$2:$B$30,2,FALSE)
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    08-28-2009
    Location
    MI
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Need formula to query an array and return a value

    Thanks! That was awesome. With a little tinkering I was able to bring in all of the long descriptions based on their codes and export to QuickBooks. Saved me countless hours.

    Great job!!

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Need formula to query an array and return a value

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved 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. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    http://www.mrexcel.com/forum/showthread.php?t=412830

+ 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