+ Reply to Thread
Results 1 to 3 of 3

How to create constructed variables in Excel

  1. #1
    Registered User
    Join Date
    06-21-2018
    Location
    sydney, australis
    MS-Off Ver
    Office 2007
    Posts
    1

    How to create constructed variables in Excel

    Hi,

    I am trying to create product codes and descriptions for products in our retail store and the items have multiple variables.

    I wanted to see if there was a way i could put in the variables (colour, material, size, etc) and have excel create all possible combinations of these for me along with a shortened product code based on the variables.

    For example:
    Variables = |Blind | White, grey, yellow, blue | 50mm, 60mm| Installed, Not-installed|
    code abbreviation = |B |W, G, Y, B | 50, 60 | I, NI|

    So I wanted it to generate the code - BW50I (and the description) Blind, White, 50mm, Installed - for all possible variables (e.g. BG50I, BY50I, BB50I, BW60I, ETC ETC ETC & DESCRIPTIONS)

    I may have not explained it well sorry. I know this is probably way outside the boundaries of what Excel is capable of but just thought i'd ask before i create 5000 product codes manually.

    Any help is appreciated.

    Thank you
    Last edited by ezkii; 06-21-2018 at 11:55 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Tough one about creating variables

    Hi, welcome to the forum

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem - not what you think the answer might be. (think google search terms?). Once you have done this please send me a PM and I will remove this request. (Also, include a link to your thread - copy from the address bar)

    Many members search our previous posts, and thread titles play a big part of the search. I doubt anybody would do a search based on your title?

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (note: this change is not optional )
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to create constructed variables in Excel

    Hi ezkii. Welcome to the forum.

    Since it appears you've made appropriate title change the following formula does this.

    It uses array constants that could just as easily be replaced with lookup tables. Here's the brute force version.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Or with lookup ranges.
    Formula: copy to clipboard
    Please Login or Register  to view this content.




    A
    B
    1
    BW50I
    Blind, White, 50mm, Installed
    2
    BG60NI
    Blind, grey, 60mm, Not-installed
    3
    BY50I
    Blind, yellow, 50mm, Installed
    4
    BB60I
    Blind, blue, 60mm, Installed




    E
    F
    G
    H
    I
    J
    K
    L
    9
    50
    60
    BB
    BG
    BW
    BY
    I
    NI
    10
    , 50mm
    , 60mm
    Blind, blue
    Blind, grey
    Blind, White
    Blind, yellow
    , Installed
    , Not-installed
    Last edited by FlameRetired; 06-22-2018 at 12:14 AM.
    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Nested Ifs/Ands and some tough to figure out variables - Would appreciate your input
    By westsidebill in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-18-2018, 08:03 AM
  2. [SOLVED] Creating a formula with various variables
    By ergibbs in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 12-30-2015, 07:45 PM
  3. Help creating a graph with 3 variables
    By Gabriel Duarte in forum Excel General
    Replies: 2
    Last Post: 11-23-2014, 07:23 AM
  4. [SOLVED] creating explanatory variables
    By bighush in forum Excel General
    Replies: 6
    Last Post: 11-03-2014, 06:34 AM
  5. Help with creating a graph with three variables
    By Grish in forum Excel General
    Replies: 0
    Last Post: 08-21-2012, 11:04 AM
  6. Creating a formula that will SUM with 2 Variables
    By B Akers in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-28-2006, 02:10 AM
  7. [SOLVED] Multiple Variables in a Commission Structure...a tough one!!!
    By Oriana G in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-21-2006, 03:55 PM

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