Combining multiple text strings into one cell

headroom

New Member
Joined
Oct 2, 2014
Messages
2
I'm a newbie - please be gentle!

I'm building an "activity log" in Excel - to make activity entry simple and standardized, I've assigned a numerical code number (1-16) to each activity description. The user would then enter all of the number codes for what they did that day into one cell and then the cell next to it would auto-populate with all of the corresponding descriptions.

For example:

Column 1 are dates; column 2 is where the user enters multiple number codes for each day; column 3 would then auto-populate with multiple text descriptions based on the users' codes, column 4 allows user to enter amount of time spent [irrelevant to this question]; columns 5 and 6 are numbered activity descriptions (with column 6 being the source of the auto-populate text descriptions).

I'm having a hard time coming up with a formula that is able to return multiple text strings into the same cell - all of the IF variations I've tried only return one value/description.

Thanks for any help you can provide!
 

Some videos you may like

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

NeonRedSharpie

Well-known Member
Joined
Jul 14, 2014
Messages
1,678
Is custom VBA an option? Otherwise your formula will end up looking like:

Code:
=IFERROR(IF(FIND(1,B1),VLOOKUP(1,$E$1:$F$16,2,0),""),"") & CHAR(10) &  IFERROR(IF(FIND(2,B1),VLOOKUP(2,$E$1:$F$16,2,0),""),"") & CHAR(10) & IFERROR(IF(FIND(3,B1),VLOOKUP(3,$E$1:$F$16,2,0),""),"")

etc. etc. And I already see issues since 1 is found in 16...
 

headroom

New Member
Joined
Oct 2, 2014
Messages
2
Thanks, NRS! Not up to speed with VBA, so I'll try your code. To solve the number duplication issue, would it work to switch to letters? For example: =IFERROR(IF(FIND(a,B1),VLOOKUP(a,$E$1:$F$16,2,0),""),"")
 

Watch MrExcel Video

Forum statistics

Threads
1,109,434
Messages
5,528,742
Members
409,832
Latest member
Misspears10

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top