+ Reply to Thread
Results 1 to 2 of 2

Lookup Problem:Category Name.

  1. #1
    Registered User
    Join Date
    04-22-2007
    Posts
    7

    Lookup Problem:Category Name.

    Hi,

    Thanks for taking the time to read this, I hope you can help. I have 7 columns:

    ColA = Product Name
    ColB = Parent/Group Name
    ColC = Image Name
    ColD = Category Name.
    ColE = Price
    ColF = Shipping Weight
    ColG = Shipping Price

    The context for the above is that we are sending out a data feed for our products and the parent group name relates to the following example:

    Line 1 <Balloons> <blank> <image1> <cat1> <blank> <blank> <blank>
    Line 2 <Balloons-Red> <Balloons> <<ToBeInserted>> <<ToBeInserted>> <2.00> <1kg> <ToBeInserted>
    Line 3 <Balloons-Purple> <Balloons> <<ToBeInserted>> <<ToBeInserted>> <3.00> <2kg> <ToBeInserted>

    The bug in our software at present means that the child items (Line 2 and Line 3), which are the items that are sold, don't contain the image/category information but these are the lines we need to export. Line 1 does not get sold and we don't want to export this, it's purely a group name for the child items. On top of this, it's possible to have single entity lines in the spreadsheet also, i.e.

    Line 4 - <Star Pattern Balloons> <blank> <image1> <cat1> <4.00> <1kg> <ToBeInserted>

    Which has no parent, it's just a single item.

    So, I need to be able to:

    1) Pattern Match the children (based on colB> to locate their parent information for ColC and ColD.

    2) Once done this, remove the parent line.

    3) Set the shipping price based on a lookup table of shipping charges within the spreadsheet.

    i..e lookup table is (ColH and colI)

    0-5kg - £10.00

    4) Once this is done, delete the Shipping Weight Column


    I hope I have explained this ok, all help is much appreciated.

  2. #2
    Forum Contributor
    Join Date
    01-24-2007
    Location
    Southampton, UK
    Posts
    137
    Interesting problem, and if I've understood it correctly the code below should do what you need....

    Please Login or Register  to view this content.
    If for any reason a child entry cannot be linked to its parent entry then error value will be inserted into the image name and category fields, and these will be highlighted at the end of the process and the parent rows will not be deleted.

    I've not completed item 3 in your list. Can you provide the look-up table being used, and say where it is exactly on the worksheet?

+ 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