How to concatenate based in a group of cells and with conditional?

MrBear24

New Member
Joined
Sep 15, 2021
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
  2. Web
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)

Capture.PNG


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)

Capture.PNG


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").

Capture.PNG


Thank you in advance for all the helpful responses.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Concatenate with conditional and reference
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,124
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top