If function to pull data from sheet1 to sheet2

FGaxha

Board Regular
Joined
Jan 10, 2023
Messages
227
Office Version
  1. 365
Platform
  1. Windows
Hi,
Help needed:
Sheet1: A,B,C,D
Sheet2:A2 =if(sheet1!A2=“yes”,B,C,D

I need all data from sheet 1 to sheet2 with no blank rows in between.
Sheet1:columnA”yes” can be randomly at ror 2,13,22,55 ,,,,,,,,

Thank you
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Sheet1:
Book2
ABCD
1
2Yes2B2C2D
3
4
5Yes5B5C5D
6Yes6B6C6D
7
8Yes8B8C8D
9
10
11
12
13Yes13B13C13D
14
Sheet1


Sheet2:
Book2
ABCDE
1Yes2B2C2D
2Yes5B5C5D
3Yes6B6C6D
4Yes8B8C8D
5Yes13B13C13D
6
Sheet2
Cell Formulas
RangeFormula
A1:D5A1=FILTER(Sheet1!A:D,Sheet1!A:A="Yes")
Dynamic array formulas.
 
Upvote 0
Thank you so much, but it was a mistake in my query,
Sheet1: A,B,C,D
Sheet2:A2 =if(sheet1!A2=“yes”,C,D

Thanks again
 
Upvote 0
To confirm, which columns do you want on sheet 2, and what columns do you want them to appear in?
E.g. I want only column C and D results to appear on sheet 2, and I want those results to appear in columns A and B.
 
Upvote 0
Put this formula in Sheet2 C1
Excel Formula:
=FILTER(Sheet1!C:D,Sheet1!A:A="Yes")
 
Upvote 1
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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