# Using multiple IF+Concatenate to return data to a single cell

1. ## Using multiple IF+Concatenate to return data to a single cell

Hello

I found this solution (IF(Z5="",Z5,Z1&Z5)) in another post about linking IF with concatenate.

I was wondering if you could do this for a number of cells and combine the results in a single cell?

I'm looking at some survey data and I'm trying to:

- find those cells with data in them (e.g. responses to a question).
- then, if this is the case, concatenate the question with the answer
- then combine all cells where there are answers into one cell

Is that possible? I've looked into nested IFs but couldn't get it to work.

Jeremy

2. ## Re: Using multiple IF+Concatenate to return data to a single cell

yes, maybe a sample spreadsheet attached to the post will help us see how the data is laid out

3. ## Re: Using multiple IF+Concatenate to return data to a single cell

Hi

Thanks for your help. Here you go:

IF query.xlsx

4. ## Re: Using multiple IF+Concatenate to return data to a single cell

you example - just show the response and not the question

try
=IF(C2<>"","Q. "&C\$1&" A."&C2,IF(E2<>"","Q. "&E\$1&" A. "&E2,""))

5. ## Re: Using multiple IF+Concatenate to return data to a single cell

Hi Etaf

Thanks for your help, and sorry it's taken me a few days to come back to you.

I've had a look at the solution and while it looks like it's including the right cells it's not showing the data.

Ideally, the results field (G2) would say:

"COMMENTS - How would you rate the cleanliness and maintenance of the gardens and grounds?, Sample text1. COMMENTS - Overall, how would you rate the cleanliness of the Hotel?Sample text3"

Am I doing something wrong?

Thanks again for you help.

Jeremy

6. ## Re: Using multiple IF+Concatenate to return data to a single cell

Try
=IF(AND(C2="",E2=""),"",IF(AND(C2<>"",E2<>""),C\$1&", "&C2&". "&E\$1&", "&E2, IF(C2<>"", C\$1&", "&C2, E\$1&", "&E2)))

7. ## Re: Using multiple IF+Concatenate to return data to a single cell

That's perfect, thank you so much.

Jeremy

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1