+ Reply to Thread
Results 1 to 8 of 8

Huge replacement formula

  1. #1
    Registered User
    Join Date
    11-30-2011
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2011 Mac
    Posts
    3

    Huge replacement formula

    I'm running an online store, and my dropshipper gives me our product list in a format where most of the needed information is found in the item number.

    Example: 1AALIPGSPH07800
    Category: 1A
    Manufacturer Code: ALI
    Etc.

    I easily built a formula to isolate the categoryID and manufacturer ID into their own columns. I then used a formula to replace the categoryID into the format needed for the online store,

    Example: =IF(AE2="1A","Skate/Essentials/Hardware","")&IF(AE2="1B","Skate/Essentials/Bearings","")& etc etc.

    There's only about 40 categories, so no issue there.

    The issue I'm having is applying the same method to replace the manufacturer ID with the full manufacturer name. There's over 650 manufacturers, which puts that formula at about 17k characters, well over Excel's limits. If the supplied item list didn't change constantly, I would just do this manually, but with 13k items changing every other week, that's just not an option. Any idea of another way to do this?

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,077

    Re: Huge replacement formula

    Could you use a VLOOKUP table?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    11-30-2011
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2011 Mac
    Posts
    3

    Re: Huge replacement formula

    Not sure, that's why I'm asking.

    If that were to work, how would I go about it?

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,695

    Re: Huge replacement formula

    You can create a 2 column table. For the category IDs for example just list all the IDs in one column, e.g. in Y2 down, and in the next column, e.g. Z2 down, you list the description ID. Now for your formula use just

    =VLOOKUP(AE2,$Y$2:$Y$50,2,0)

    You can do the same thing for your manufacturer IDs
    Audere est facere

  5. #5
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Huge replacement formula

    Quote Originally Posted by daddylonglegs View Post
    =VLOOKUP(AE2,$Y$2:$Y$50,2,0)
    A minor change, it should be $Z$50 instead of $Y$50

    =VLOOKUP(AE2,$Y$2:$Z$50,2,0)
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,695

    Re: Huge replacement formula

    Exactly right! my mistake, thanks Haseeb

  7. #7
    Registered User
    Join Date
    11-30-2011
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2011 Mac
    Posts
    3

    Re: Huge replacement formula

    So I set up another worksheet ("Brands") with the first column full of the Manufacturer ID's and the second column full of the matching Names. Here's the formula I'm using on the Master sheet:

    =VLOOKUP(Master!B2,Brands!A2:B651,Brands!B2:B651,FALSE)

    This method definitely seems like it will be easier, but the problem is now I'm geting a #REF! error.

    Thanks for the help so far, hopefully we can get this figured out.

    Edit: Got it. Formula used: =VLOOKUP(Master!B2,Brands!A2:B651,2,0)

    Double Edit: I lied. It's showing values for the first few hundred, but the rest return an #N/A response.
    Last edited by Falcon Punch; 12-01-2011 at 11:22 AM.

  8. #8
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Huge replacement formula

    Quote Originally Posted by daddylonglegs View Post
    Exactly right! my mistake, thanks Haseeb
    You are welcome DDL

    Quote Originally Posted by Falcon Punch View Post
    Formula used: =VLOOKUP(Master!B2,Brands!A2:B651,2,0)

    It's showing values for the first few hundred, but the rest return an #N/A
    If you are copying down, you need to lock the table_array range or use whole column reference.

    =VLOOKUP(B2,Brands!A$2:B$651,2,0)

    Or, whole columns reference

    =VLOOKUP(B2,Brands!A:B,2,0)

+ 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