formula help

%3CLINGO-SUB%20id%3D%22lingo-sub-1721414%22%20slang%3D%22en-US%22%3Eformula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1721414%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20help%20on%20writing%20a%20formula%20to%20consolidate%20text%20horizontally%20and%20vertically%20from%20one%20tab%20to%20another.%20almost%20like%20a%20vlookup%20and%20sumif%20for%20text.%20I%20tried%20to%20use%20%3Dtextjoin(%20function%20but%20was%20unsuccessful.%20Below%20is%20the%20example%20on%20what%20output%20i%20would%20need%20returned%2C%20in%20%3CFONT%20color%3D%22%23339966%22%3Egreen%3C%2FFONT%3E.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3E%3CEM%3E%22Detail%20tab%22%3C%2FEM%3E%3C%2FU%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ECol%201%3C%2FSTRONG%3E%26nbsp%3B%20%26nbsp%3B%3CSTRONG%3ECol%202%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Col%203%20(drop%20down)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EDog%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BHe%20went%20for%20a%20walk%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BActivity%3C%2FP%3E%3CP%3ECat%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20She%20didn't%20eat%20her%20food%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BFood%3C%2FP%3E%3CP%3EDog%26nbsp%3B%20%26nbsp%3B%20He%20is%20sleeping.%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BActivity%3C%2FP%3E%3CP%3EBear%26nbsp%3B%20%26nbsp%3B%20She%20is%20very%20happy%20right%20now.%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Mood%3C%2FP%3E%3CP%3ECat%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20She%20isn't%20feeling%20well.%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Mood%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3E%3CEM%3E%22Summary%20Tab%22%3C%2FEM%3E%3C%2FU%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EAnimal%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BActivity%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Food%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BMood%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EDog%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%3CFONT%20color%3D%22%23339966%22%3EHe%20went%20for%20a%20walk.%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20He%20is%20sleeping.%3C%2FFONT%3E%3C%2FP%3E%3CP%3ECat%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3CFONT%20color%3D%22%23339966%22%3EShe%20didn't%20eat%20her%20food.%26nbsp%3B%3C%2FFONT%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%3CFONT%20color%3D%22%23339966%22%3EShe%20isn't%20feeling%20well.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBear%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%3CFONT%20color%3D%22%23339966%22%3EShe%20is%20very%20happy%20right%20now.%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1721414%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1721670%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1721670%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F812168%22%20target%3D%22_blank%22%3E%40Ravi_Shah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20B2%20on%20the%20Summary%20sheet%2C%20as%20an%20array%20formula%20confirmed%20with%20Ctrl%2BShift%2BEnter%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DTEXTJOIN(CHAR(10)%2CTRUE%2CIF((Detail!%24A%241%3A%24A%2427%3D%24A2)*(Detail!%24C%241%3A%24C%2427%3DB%241)%2CDetail!%24B%241%3A%24B%2427%2C%22%22))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAdjust%20the%20ranges%20as%20needed.%3C%2FP%3E%0A%3CP%3EFill%20to%20the%20right%2C%20then%20down%20(or%20vice%20versa).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1721725%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1721725%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F812168%22%20target%3D%22_blank%22%3E%40Ravi_Shah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20easiest%20solution%20is%20using%20Power%20Query%26nbsp%3B%3C%2FP%3E%3CP%3Eplease%20see%20the%20attached%20file%3C%2FP%3E%3CP%3EI%20used%20%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZBDrtjWkQM4%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZBDrtjWkQM4%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I need help on writing a formula to consolidate text horizontally and vertically from one tab to another. almost like a vlookup and sumif for text. I tried to use =textjoin( function but was unsuccessful. Below is the example on what output i would need returned, in green

"Detail tab"

Col 1   Col 2                                      Col 3 (drop down)

Dog     He went for a walk                       Activity

Cat      She didn't eat her food                 Food

Dog    He is sleeping.                               Activity

Bear    She is very happy right now.        Mood

Cat      She isn't feeling well.                    Mood

 

"Summary Tab"

Animal             Activity                        Food                                     Mood

Dog         He went for a walk.       

                He is sleeping.

Cat                                            She didn't eat her food.             She isn't feeling well.

 

Bear                                                                                             She is very happy right now. 

 

 

 

4 Replies
Highlighted

@Ravi_Shah 

In B2 on the Summary sheet, as an array formula confirmed with Ctrl+Shift+Enter:

 

=TEXTJOIN(CHAR(10),TRUE,IF((Detail!$A$1:$A$27=$A2)*(Detail!$C$1:$C$27=B$1),Detail!$B$1:$B$27,""))

 

Adjust the ranges as needed.

Fill to the right, then down (or vice versa).

Highlighted

@Ravi_Shah 

 

The easiest solution is using Power Query 

please see the attached file

I used : https://www.youtube.com/watch?v=ZBDrtjWkQM4

 

 

 

In this video, I'd like to show how to "Show multiple text entries in one cell of a Pivot Table". You may read the question and download the workbook from th...
Highlighted

Hans that isn't working for me, i've tried. The return i'm getting is everything see attached. @Hans Vogelaar 

Highlighted

@Ravi_Shah 

1) You have to confirm the formula with Ctrl+Shift+Enter to make it an array formula. It won't work as an ordinary formula.

2) There are spaces after some of the animal names on the Detail sheet in your sample workbook. If you remove those the (array) formula should return the correct results.