Need help with concatenate formula

Copper Contributor

I've managed to put together a spreadsheet because I'm trying to reduce time it takes to do manual data entry.  I've tried some VBA but my skills are no where near what they should be to use it.  My formula skills are okay, but I learned it on my own so my knowledge is limited at best.  

To keep it brief, I work for a newspaper as a data entry clerk in the sports department. We have to enter schedules in their system Adobe InCopy.  Obtaining the schedule data requires manual lookup on specific high school athletic websites.  Example: I manually go to high school A website athletic schedule and find out who they are playing a certain day.  I then go into the company system and manually type team A at team B, 4:30 p.m. ...  Yes, typing the periods in between pm is quite tedious.  In the spreadsheet I put together, I managed to allow typing a number that represents the school so instead of type out the word "team A" I type "1" and that specific team enters into a specific cell.  Likewise for the team they are playing and the comma and time.  The time is also represented by a certain number; i.e. 3=3:30 p.m.  After typing the numbers in that represent the words, I created another cell that includes those words all concatenated together in one cell.  Ergo, once I'm done typing the numbers, the sentence of "team A at team B, 3:30 p.m." is ready to be copy and pasted into the company system.  It has shaved off approximately 20 to 40 seconds of data entry saving a ton of time.  

Now what I'm trying to do is hit up a different part of entering these schedules.  Sometimes these schools have a tournament amongst multiple schools.  When this happens the data entry appears as such: "Lincoln High School tournament (team A, team C, team F), 2 p.m.  The data in the parenthesis can vary from 1 school to as much as 14 schools.  I managed to create something similar to the above method of entering a number and then the data generates in a concatenated cell.  When I did this, I used rows H25 all the way down to H37, allowing the user to enter the number of the school and then having it generate over to the concatenated cell.  The problem I'm having, is that (as you will notice in my formula) when I delete a number that represents a school, the field where the concatenated data comes from turns to #N/A, thus completely removing the entire concatenated cell to an error showing the #N/A in the cell where the concatenated data should be.  I've gotten as far as using IFNA and ISNA along with other formulas like TEXTJOIN and ISBLANK and the furthest I got where I'm pretty much stuck is IFNA and/or ISNA don't fully read the cell range of H25 to H37.  The data that appears in the concatenated field only reads two schools (1 of which is randomly from the middle of the list).  If someone can help me here that would be great.  I'm trying to get it so that the list from H25 to H37 is variable to the user and they can type in whatever schools they need to and for the concatenated cell to ignore blanks when there isn't anything entered in, for example cells H30 to H37.  In my example only cells H25 to H29 would be filled with a number representing a school and the format I explained earlier in the concatenated cell would appear like so: "Lincoln high school tournament (team A, team C, team F, team G), 2 p.m."

 

Here are the formula's I'm trying to use, however if anyone knows of a better one or more efficient please let me know:

 

Original one I created (it works but I can't delete anything out of cells H25 to H37):

=CONCATENATE(E21," ","(",G21,","," ",H25,","," ",H26,","," ",H27,","," ",H28,","," ",H29,","," ",H30,","," ",H31,","," ",H32,","," ",H33,","," ",H34,","," ",H35,","," ",H36,","," ",H37,")",",",H21)

 

2nd one: This was the closest I came to making it work with IFNA, but it doesn't read all the schools in H25 to H37:

=CONCATENATE(E21," ","(",G21,","," ",(IFNA(H25&",",""&" "&(IFNA(H26&",",""&" "&(IFNA(H27&",",""&" "&(IFNA(H28&",",""&" "&(IFNA(H29&",",""&" "&(IFNA(H30&",",""&" "&(IFNA(H31&",",""&" "&(IFNA(H32&",",""&" "&(IFNA(H33&",",""&" "&(IFNA(H34&",",""&" "&(IFNA(H35&",",""&" "&(IFNA(H36&",",""&" "&(IFNA(H37&")","")))))))))))))))))))))))))))

 

Thank you 

2 Replies

Hi Dave,

 

This could work

=G21 & " (" & TEXTJOIN(",",TRUE,IFERROR(H25:H37,"")) & "), "&H21

if you use it as array formula (Ctrl+Shift+Enter)

image.png

However, better not to return #N/A into H cells

In my CONCATENATE formula problem I am combining selections made in a few dropdowns in cells, one of which is a date. When I combine the answers, the date always shows up as the datevalue (example: 11/26/2018 shows up as 43430). I need that part to show as "mm-dd-yyyy" showing the actual date. How do I do this?