Copy/paste cells only if the value of the copied cell doesn't appear in another cell.

jerry1992

New Member
Joined
Sep 13, 2021
Messages
8
Office Version
  1. 2019
Platform
  1. Windows
Hello I am trying to copy cells A3-34(sheet3) except where the value of the cell is equal to the value
of any cells in P2-100(sheet1) then paste those values into H2-33(sheet3)

Then If possible I would also like to delete any cell outside of a range specified by a value in H1(sheet3)

So if the value in H1(sheet3) is 8, then any value outside of H2-9(sheet3) but within H2-33(sheet3), would be deleted.

Is this possible?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Change $C$3:$C$34 to Sheet1!$P$3:$P$34 at Formula
Try this:
Book1
ABCDEFG
1
2Column AColumn PColumn H
32045 
42541 
516616
6142514
7174217
8202 
9182018
10311231
112443 
128268
13371337
14211521
15184618
16162816
1731231
184025 
19353435
202532 
212430 
22234723
23331233
243222 
25212621
262240 
271421
28243 
29183218
3023923
3118618
322524 
331548 
347417
35
Sheet3
Cell Formulas
RangeFormula
F3:F34F3=IF(COUNTIFS($C$3:$C$34,A3)=0,A3,"")
 
Upvote 0
Solution
Change $C$3:$C$34 to Sheet1!$P$3:$P$34 at Formula
Try this:
Book1
ABCDEFG
1
2Column AColumn PColumn H
32045 
42541 
516616
6142514
7174217
8202 
9182018
10311231
112443 
128268
13371337
14211521
15184618
16162816
1731231
184025 
19353435
202532 
212430 
22234723
23331233
243222 
25212621
262240 
271421
28243 
29183218
3023923
3118618
322524 
331548 
347417
35
Sheet3
Cell Formulas
RangeFormula
F3:F34F3=IF(COUNTIFS($C$3:$C$34,A3)=0,A3,"")
Thank you!
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

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