Concat text if first item is Parent item - Issue

desibouy

Board Regular
Joined
Nov 20, 2014
Messages
98
Office Version
  1. 365
Platform
  1. Windows
Hi,


I'm trying to automate Part# on a inventory spreadsheet but struggling. Below is my spreadsheet and the layout.
The Part # for the Parent Item should be the concatenate of the child items comma separated. The Part # for the child should be the same as the Item Number like below.

I've used formula
Code:
=IF(B2="Child Matrix Item",A2,CONCATENATE(D2,",",D3,",",D4,",",D4))
for the Parent Part # to but then If item only has 2 child items then it obviously it won't work and having to constantly amending the formula or having to do it manually.

FYI the first Parent Matrix Item, should show 123, 456, 789 -- notice the last code doesn't have a a comma at the end.
See Last table.


please can someone help?


Item NumberTypeSub item ofPart #
Test 1Parent Matrix Item
123Child Matrix ItemTest 1123
456Child Matrix ItemTest 1456
789Child Matrix ItemTest 1789
Test 2Parent Matrix Item
987Child Matrix ItemTest 2987
654Child Matrix ItemTest 2654






Item NumberTypeSub item ofPart #
Test 1Parent Matrix Item123, 456, 789
123Child Matrix ItemTest 1123
456Child Matrix ItemTest 1456
789Child Matrix ItemTest 1789
Test 2Parent Matrix Item987, 654
987Child Matrix ItemTest 2987
654Child Matrix ItemTest 2654

<tbody>
</tbody>
 
Last edited:

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Sorry Gaz, It didn't notify me of your answer so couldn't respond.

Here is the actual Data.

Item Name/NumberMatrix TypeSub Item OfPart #
Diabetes Care Pocket® Blood Glucose MeterParent Matrix ItemOP050300K,OP050301P,OP050302B,OP050303G,OP070802B
OP050302BChild Matrix ItemDiabetes Care Pocket® Blood Glucose MeterOP050302B
OP050300KChild Matrix ItemDiabetes Care Pocket® Blood Glucose MeterOP050300K
OP050301PChild Matrix ItemDiabetes Care Pocket® Blood Glucose MeterOP050301P
OP050303GChild Matrix ItemDiabetes Care Pocket® Blood Glucose MeterOP050303G
OP070802BChild Matrix ItemDiabetes Care Pocket® Blood Glucose MeterOP070802B

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
So, if Sub Item Of = Item Name then concatenate?

Only the Parent to concat, the sub items (child items) should only be the normal item codes.

I have another issue too, but I will mention it later,

Thanks
 
Upvote 0

Forum statistics

Threads
1,215,454
Messages
6,124,933
Members
449,195
Latest member
Stevenciu

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