Horizontal lookup when cell is not blank

Enrique Rod

New Member
Joined
Sep 25, 2019
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
Hi, I have the results of a survey with 4,500 responses, the report groups respondents with similar characteristics in different columns as shown below. I'm looking for a way to retrieve all responses for each question in one column. I've tried Hlookup with CountA, but it's just not working.
  • Each question may include its own responses since some of them are multiple choice, drop-down, etc.
  • Depending upon the characteristics of the respondent (example: Marital Status) , some might get additional questions. See Question 1-D highlighted in yellow as an example. If the respondent doesn't fall in the logic for the additional question, the system doesn't include the question in blank in the report, just doesn't include it at all, making the hlookup quite more difficult.
  • More than one response appears in the same column (see respondent 2 and 4 as an example).
  • I'm using Excel 2019
Any help would be very much appreciated.

1633107047790.png


Raúl
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I'm using Excel 2019
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=IFERROR(INDEX($C5:$L5,AGGREGATE(15,6,(COLUMN($C$4:$L$4)-COLUMN($C$4)+1)/($C$4:$L$4=M$4)/($C5:$L5<>""),1)),"")
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=IFERROR(INDEX($C5:$L5,AGGREGATE(15,6,(COLUMN($C$4:$L$4)-COLUMN($C$4)+1)/($C$4:$L$4=M$4)/($C5:$L5<>""),1)),"")
After some data arrangements, this worked perfectly, Thank you!!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top