TEXTJOIN/Nested IF error

%3CLINGO-SUB%20id%3D%22lingo-sub-2793118%22%20slang%3D%22en-US%22%3ETEXTJOIN%2FNested%20IF%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2793118%22%20slang%3D%22en-US%22%3E%3CP%3EOk%2C%20So%20I%E2%80%99m%20almost%20complete%20with%20this%20simple%20excel%20database%20I%20created%20to%20help%20make%20my%20job%20more%20efficient.%20The%20only%20issue%20I%20am%20running%20into%20is%20creating%20an%20accurate%20%3CSTRONG%3ETEXTJOIN%20%3C%2FSTRONG%3Efunction.%20The%20conditions%20and%20strings%20I%20have%20included%20seems%20to%20be%20accurate%20however%20excel%20keeps%20giving%20me%20an%20error%20of%20either%20%E2%80%9Ctoo%20many%20argument%E2%80%9D%2C%20or%20just%20plain%20error..%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20my%20coding%20I%20need%20some%20guidance%20on%20the%20%3CSTRONG%3E124%20TAB%3C%2FSTRONG%3E%20to%20communicate%20with%20the%20%3CSTRONG%3E124DS%3C%2FSTRONG%3E%20tab%20within%20the%20workbook.%20The%20cells%20within%20that%20tab%20need%20to%20work%20in%20unison%20with%20each%20other.%20The%20condition%20I%20am%20trying%20to%20create%20for%20EX.%20each%20store%20(ex.%201146)%20should%20copy%20all%20trailer%20numbers%20onto%20the%20124DS%20if%20the%20condition%20of%20%E2%80%9CH%E2%80%9D%20is%20true.%20As%20you%20can%20see%20I%20have%20the%20worksheet%20communicating%20with%20each%20other%20already.%20HOWEVER%20I%20sometimes%20can%20have%20more%20than%20one%20%E2%80%9CH%E2%80%9D%20trailer%20for%20the%20same%20store%20which%20is%20why%20I%20was%20trying%20to%20add%20in%20a%20JOIN%20statement.%20I%20also%20tried%20with%20concatenate%20func%20but%20that%20was%20to%20no%20avail%20either.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20what%20I%E2%80%99ve%20been%20trying%20to%20run%20with%20no%20luck%3A%3C%2FP%3E%3CP%3E%3DTEXTJOIN(%E2%80%9C%26nbsp%3B%26nbsp%3B%20%2C%26nbsp%3B%26nbsp%3B%20%E2%80%9C%2CTRUE%2C%20IF('124'!K6%3D%22H%22%2C'124'!I6%2C%20IF('124'!N6%3D%22H%22%2C'124'!L6%2C%20IF('124'!Q6%3D%22H%22%2C'124'!O6%2C%22%22))))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EANY%20HELP%20WOULD%20BE%20appreciated%3B%20I%20just%20know%20the%20solution%20is%20simple%20I%20just%20don%E2%80%99t%20know%20where%20my%20error%20is.%20I%20placed%202%20%E2%80%9CH%E2%80%9D%20trailers%20in%201146%20box%20on%20worksheet%20124%20to%20run%20the%20conditions%20on%20124DS%20in%20its%20corresponding%201146%20location%20in%20124DS.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2793118%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2793205%22%20slang%3D%22en-US%22%3ERe%3A%20TEXTJOIN%2FNested%20IF%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2793205%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1151324%22%20target%3D%22_blank%22%3E%40Optimistic92%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DTEXTJOIN(%22%20%2C%20%22%2CTRUE%2CIF('124'!K6%3AQ6%3D%22H%22%2C'124'!I6%3AO6%2C%22%22))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2793315%22%20slang%3D%22en-US%22%3ERe%3A%20TEXTJOIN%2FNested%20IF%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2793315%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1151324%22%20target%3D%22_blank%22%3E%40Optimistic92%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20guess%20you%20are%20on%20an%20old%20version%20of%20Excel.%20Since%20this%20is%20an%20array%20formula%20you%20have%20to%20use%20the%20magic%20keystroke%20CRTL-SHIFT-ENTER.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Ok, So I’m almost complete with this simple excel database I created to help make my job more efficient. The only issue I am running into is creating an accurate TEXTJOIN function. The conditions and strings I have included seems to be accurate however excel keeps giving me an error of either “too many argument”, or just plain error..

 

In my coding I need some guidance on the 124 TAB to communicate with the 124DS tab within the workbook. The cells within that tab need to work in unison with each other. The condition I am trying to create for EX. each store (ex. 1146) should copy all trailer numbers onto the 124DS if the condition of “H” is true. As you can see I have the worksheet communicating with each other already. HOWEVER I sometimes can have more than one “H” trailer for the same store which is why I was trying to add in a JOIN statement. I also tried with concatenate func but that was to no avail either.

 

This is what I’ve been trying to run with no luck:

=TEXTJOIN(“   ,   “,TRUE, IF('124'!K6="H",'124'!I6, IF('124'!N6="H",'124'!L6, IF('124'!Q6="H",'124'!O6,""))))

 

ANY HELP WOULD BE appreciated; I just know the solution is simple I just don’t know where my error is. I placed 2 “H” trailers in 1146 box on worksheet 124 to run the conditions on 124DS in its corresponding 1146 location in 124DS.

4 Replies

@Optimistic92 

=TEXTJOIN(" , ",TRUE,IF('124'!K6:Q6="H",'124'!I6:O6,""))

 

Hi, thanks for your response the string you provided is one that I initially used and excel returned #VALUE!

The one I currently have keyed is this:
=TEXTJOIN(" , ",TRUE,IF('124'!K6="H",'124'!I6,IF('124'!N6="H",'124'!L6,IF('124'!Q6="H",'124'!O6,""))))

Although it is returning the value from cell I6 it is not including the other "H" value from N6, this is the main issue I am encountering, its only giving me a partial return.

@Optimistic92 

I guess you are on an old version of Excel. Since this is an array formula you have to use the magic keystroke CRTL-SHIFT-ENTER.

 

Thank You,
Not how I expected but the CRTL-SHIFT-ETR function did work. Apparently something I hadn't know is Excel will not allow you to enter an array formula over merged cells. This is certainly helpful for the time being though, Thank you!