return multiple matching values into one cell based on multiple criteria in Excel

MMM_84

New Member
Joined
Jan 13, 2021
Messages
28
Office Version
  1. 365
Platform
  1. Windows
Hi all,
Need a way how to return multiple values into one cell based on multiple criteria. I was trying to use textjoin (char 10) and then index match, but it seems smth is wrong....
maybe you could find a solution either the function or vba .....

Based on "Reference" (Column B), "Type" (Column D) and "Criteria" (column F), return matching "ID number", "Period" and "Comment" into one cell in a separate workbook. See the attachments.
Book1.xlsx
ABCDEFGHI
1ID numberReferencePeriodTypeCommentCriteriaetc.1etc.2etc.3
215645441B206-05-99AppleOut of scopeABC1
31545633B207-05-99CarrotIn StockABC3
47863896B308-05-99CucumberShortageABC4
5741526B409-05-99PotatoAbundanceABC5
6896544B510-05-99PeachOut of scopeABC1
79865436B611-05-99StrawberryIn StockABC2
868986546B112-05-99BlueberryIn StockABC7
968986547B213-05-99PeachOut of scopeABC1
1068986548B314-05-99TomatoOut of scopeABC3
1168986549B415-05-99AppleABCABC4
1268986550B516-05-99CarrotAbundanceABC5
1368986551B117-05-99AppleIn StockABC1
1468986552B318-05-99AppleIn StockABC2
1568986553B319-05-99PotatoAbundanceABC7
1668986554B420-05-99CucumberOut of scopeABC5
1768986555B521-05-99BlueberryAbundanceABC4
main




Book1.xlsx
ABCDE
1TypeApple
2ReferenceB1B2B3B4
3Criteria
4ABC1ID Number: 68986551 Period: 17-05-1999 Comment: In StockID Number: 15645441 Period: 06-05-1999 Comment: Out of scope
5ABC2ID Number: 68986552 Period: 18-05-1999 Comment: In Stock
6ABC3
7ABC4ID Number: 68986549 Period: 15-05-1999 Comment: ABC
8ABC5
9ABC6
10ABC7
11ABC8
12ABC9
13ABC10
Apple
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
couple of questions ,
into one cell in a separate workbook.
1) is this a new WORKBOOK or into a new WorkSheet in the same WorkBook ?
I was trying to use textjoin (char 10)
2) are you still using version 2016 as in your profile ?
Textjoin didnt get released until 2019 version according to MS reference site
 
Upvote 0
couple of questions ,

1) is this a new WORKBOOK or into a new WorkSheet in the same WorkBook ?

2) are you still using version 2016 as in your profile ?
Textjoin didnt get released until 2019 version according to MS reference site
1 - it's a workbook, but if not possible, then worksheet would work as well
2 - MS 365
 
Upvote 0
Hi all,
Need a way how to return multiple values into one cell based on multiple criteria. I was trying to use textjoin (char 10) and then index match, but it seems smth is wrong....
maybe you could find a solution either the function or vba .....

Based on "Reference" (Column B), "Type" (Column D) and "Criteria" (column F), return matching "ID number", "Period" and "Comment" into one cell in a separate workbook. See the attachments.
Book1.xlsx
ABCDEFGHI
1ID numberReferencePeriodTypeCommentCriteriaetc.1etc.2etc.3
215645441B206-05-99AppleOut of scopeABC1
31545633B207-05-99CarrotIn StockABC3
47863896B308-05-99CucumberShortageABC4
5741526B409-05-99PotatoAbundanceABC5
6896544B510-05-99PeachOut of scopeABC1
79865436B611-05-99StrawberryIn StockABC2
868986546B112-05-99BlueberryIn StockABC7
968986547B213-05-99PeachOut of scopeABC1
1068986548B314-05-99TomatoOut of scopeABC3
1168986549B415-05-99AppleABCABC4
1268986550B516-05-99CarrotAbundanceABC5
1368986551B117-05-99AppleIn StockABC1
1468986552B318-05-99AppleIn StockABC2
1568986553B319-05-99PotatoAbundanceABC7
1668986554B420-05-99CucumberOut of scopeABC5
1768986555B521-05-99BlueberryAbundanceABC4
main




Book1.xlsx
ABCDE
1TypeApple
2ReferenceB1B2B3B4
3Criteria
4ABC1ID Number: 68986551 Period: 17-05-1999 Comment: In StockID Number: 15645441 Period: 06-05-1999 Comment: Out of scope
5ABC2ID Number: 68986552 Period: 18-05-1999 Comment: In Stock
6ABC3
7ABC4ID Number: 68986549 Period: 15-05-1999 Comment: ABC
8ABC5
9ABC6
10ABC7
11ABC8
12ABC9
13ABC10
Apple
I have managed to solve it with textjoin and filter function, but was wondering what would be a VBA code for this
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,195
Members
452,616
Latest member
intern444

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