Consulting

Results 1 to 3 of 3

Thread: Concatenate with conditional and reference

  1. #1
    VBAX Newbie
    Joined
    Sep 2021
    Posts
    4
    Location

    Concatenate with conditional and reference

    Hello, this is what I need to complete for a soonTM project that I will be involved.

    Explanation: I have 2 sheets: Matrix and Info. First, I need to check what number of Matrix I am going to use. For this, I go to sheet "Info" and for this example I will need to use the Matrix 40 (Note that it will not always be #40, sometimes I will need to use #20, #30 or #50, that cell "I2" will always specified me which matrix i will use. Also, in the near future there might be additional number of Matrix)

    https://ibb.co/xDCZ5Hg

    Now that I know which matrix I'm using, I go to sheet "Matrix" and check the range of cells I will need to use for the matrix. Since #40 is the matrix I need to use to complete this example, those are the attributes that I need to concatenate. The information for those attributes are in the sheet "Info". (check last link)

    https://ibb.co/7nbxctV

    I need to create a macro VBA that can concatenate those attributes from sheet "Matrix" to its corresponding information in sheet "Info" in the same order specified by column "B", but if there is information like "Not specified" or "Missing info", then you skip the concatenate for that attribute. The concatenation must follow this order: 1-Attribute#1=Value#1, 2-Attribute#2="Value#2", ...

    So, for first product the right answer would be: 1-Brand="Casio", 2-Size="M", 3-Colour="Blue", 4-Type="A", 5-Origin="Finland". Attribute Recommendation will not be involved here since it is"Not specified".

    Since for this exercise I have 5 products, the concatenation must be in Column "I" (Note: Sometimes, we will work with 1000 products or more, but the concatenation will always be in column "I").

    https://ibb.co/J3wYRDZ

    Thank you in advance for all the helpful responses.
    Last edited by MrBear24; 09-14-2021 at 08:05 PM.

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    An image on another hosting site is not very helpful

    Attach a small sample workbook with sample data to your post here

    See my sig for instructions
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    VBAX Newbie
    Joined
    Sep 2021
    Posts
    4
    Location
    Ok, im uploading the xcel file. Hope this can helps.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •