Find a value in a column and bring back a corresponding value

levans_1986

New Member
Joined
Aug 9, 2017
Messages
13
Hello
I want to populate a column with survey numbers from another worksheet. However I only want the survey number to appear if the answer to the question is yes. In worksheet 1 I have a column with yes/no in. There is another column with the survey number in. On worksheet 2 I have a column for survey number but I only want it to appear if the answer is yes in the previous worksheet.

I have tried using if(and) however it maybe that the answer of yes doesnt appear for many rows so my nested if is getting very large! Also I dont want it to bring back a survey number twice.

Does anyone have any ideas?

Many thanks
Laura
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
There's no reason for nested Ifs if you are only checking the one column. I suggest you post some example data as you may not be explaining completely what it is you require.
 
Upvote 0
Hi Stiuart

Apologies its my first time posting!

As an example, sheet 1 has two columns survey number and response. Response is either yes or no. Eg
SurveyNoResponse
A1No
A2No
A3No
A4No
A5Yes
A6No
A7Yes

<colgroup><col style="width:48pt" width="64" span="2"> </colgroup><tbody>
</tbody>

Sheet 2 has a column with survey number and then some other columns after it. In sheet 2 I want the survey number column to be automatically populated with the survey numbers from sheet 1, however only when the response is equal to yes.

does that help at all? I'm not great on vba so would be good to avoid that if possible! apologies if I'm still unclear!

thanks

laura
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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