Copying data to another sheet based on rule, with no blank spaces

MurdochQuill

Board Regular
Joined
Nov 21, 2020
Messages
84
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I'm trying to copy according to yes/no rules to another sheet. When I copy, I want to get rid of the blank spaces between outputs, but not have them duplicate either. Anyone know how to do this?

Here's what I have so far:

First sheet with raw data:

Book2
ABCDEF
1Name DescriptionTypeCodeMethod
2SaturnLargeGasGLS-01Yes
3CeresProtoSmallSM-01No
4EarthInhabMedEARTH-00Yes
5Earth 2UninhabMedEARTH-01No
6
7
8
Sheet1


Destination sheet with outputted data:

Cell Formulas
RangeFormula
A7:F7,A9:F12,A8:D8A7=IF(Sheet1!$F2 = "YES", IF((Sheet1!A2)="","",(Sheet1!A2)),"")



However I would like it to format like this:
Book2
ABCDEF
1Name DescriptionTypeCodeMethod
2SaturnLargeGasGLS-01Yes
3EarthInhabMedEARTH-00Yes
4
5
Sheet2
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try the yellow Part formula at sheet2. Press CTRL+SHIFT+ENTER:

Book1
ABCDEFGHIJKLMN
1Name DescriptionTypeCodeMethodName DescriptionTypeCodeMethod
2SaturnLargeGasGLS-01YesSaturnLargeGasGLS-010Yes
3CeresProtoSmallSM-01NoEarthInhabMedEARTH-000Yes
4EarthInhabMedEARTH-00Yes      
5Earth 2UninhabMedEARTH-01No      
6
7
8
9
Sheet1
Cell Formulas
RangeFormula
H2:M5H2=IFERROR(INDEX(A$2:A$5,SMALL(IF($F$2:$F$5="Yes",ROW($F$2:$F$5)-ROW(INDEX($F$2:$F$5,1,1))+1),ROWS($H$2:H2))),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
As you have 365 another option is
+Fluff 1.xlsm
ABCDEFGHIJKLMN
1Name DescriptionTypeCodeMethodName DescriptionTypeCodeMethod
2SaturnLargeGasGLS-01YesSaturnLargeGasGLS-01Yes
3CeresProtoSmallSM-01NoEarthInhabMedEARTH-00Yes
4EarthInhabMedEARTH-00Yes
5Earth 2UninhabMedEARTH-01No
6
7
8
Master
Cell Formulas
RangeFormula
I2:N3I2=LET(fltr,FILTER(A2:F100,F2:F100="Yes"),IF(ISBLANK(fltr),"",fltr))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,169
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