Coping and Removing Blank cells

Tcarmouche

New Member
Joined
Oct 12, 2022
Messages
20
Office Version
  1. 2016
Platform
  1. Windows
I have 2 formulas that I need to combine into 1 can anyone help. Here’s the scenario: If Sheet1 cell P2 equals Sheet1 cell R2, copy cell B2 into Sheet2 cell A7. However when I go further down the sheet on Sheet1 (i.e. B17) I don’t want it to copy onto sheet2 in the same location as sheet1, I need it to copy one under the other (I.e. copy onto Sheet2 A7 then A8 and so on)

=IF(Sheet1.!P2=Sheet1|$R$2,Sheet11B2,"")

=IFERROR(INDEX$A$1:$A$5000,SMALL(IF($A$1:$A$5000<>"",ROW($A$1:$A$5000)-
ROW(SA$1)+1),ROW(A7))),"")
 

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.
Can you post some sample data along with expected results.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Can you post some sample data along with expected results.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
I can’t use that program on a government computer.
 
Upvote 0
No you cannot, however you could upload it to a share site such as oneDrive, Dropbox, GoogleDrive, then mark for sharing & post the link you are given to the thread.
 
Upvote 0
Ok, fair enough. Are you trying to match all of col P to R2, or match P2 to R2 P3 to R3 etc?

No you cannot, however you could upload it to a share site such as oneDrive, Dropbox, GoogleDrive, then mark for sharing & post the link you are given to the thread.
 
Upvote 0
Thanks for that.
How about
New Vanity1.xlsx
AB
5
6NAMEDETACH DATE
7ERRR1-Jan-22
8THHHH6-Jan-22
9TEST5-Jan-22
10
11
12
13
Sheet2
Cell Formulas
RangeFormula
A7:B9A7=CHOOSECOLS(FILTER(Sheet1!B2:K5001,Sheet1!P2:P5001=Sheet1!R2),1,-1)
Dynamic array formulas.
Named Ranges
NameRefers ToCells
MyMonth=Sheet1!$P$2:$P$5000A7
NameDropList=Sheet1!$H$2:$H$8A7
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B7:B5001Dates OccurringtodaytextNO
B7:B5001Dates OccurringtomorrowtextNO
B7:B5001Expression=AND(B7>TODAY(), B7-TODAY()>=WEEKDAY(B7), B7-TODAY()<WEEKDAY(B7)+7)textNO
 
Upvote 0
Thanks for that.
How about
New Vanity1.xlsx
AB
5
6NAMEDETACH DATE
7ERRR1-Jan-22
8THHHH6-Jan-22
9TEST5-Jan-22
10
11
12
13
Sheet2
Cell Formulas
RangeFormula
A7:B9A7=CHOOSECOLS(FILTER(Sheet1!B2:K5001,Sheet1!P2:P5001=Sheet1!R2),1,-1)
Dynamic array formulas.
Named Ranges
NameRefers ToCells
MyMonth=Sheet1!$P$2:$P$5000A7
NameDropList=Sheet1!$H$2:$H$8A7
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B7:B5001Dates OccurringtodaytextNO
B7:B5001Dates OccurringtomorrowtextNO
B7:B5001Expression=AND(B7>TODAY(), B7-TODAY()>=WEEKDAY(B7), B7-TODAY()<WEEKDAY(B7)+7)textNO
Ok where am I placing this and is this doing?
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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