Filter cells based on a different column

topi1

Board Regular
Joined
Aug 6, 2014
Messages
161
Office Version
  1. 2010
Hoping to get a VBA for the following tasks. Thank you in advance.

Sheet name is "Filter"
Column P has strings which may be more than word.
Column F has cells which may have sentences.
Some cells in the column F may have a single occurance of one of the column P strings.
I want the vba to first remove column F cells which do not have any P1 strings.
Then, I want vba to remove P1 strings from F cells leaving behind remaining contents that may be beofre &/or after the string.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Correction....
Hoping to get a VBA for the following tasks. Thank you in advance.

Sheet name is "Filter"
Cells P1:P10 have strings which may be more than word.
Column F has cells which may have sentences.
Some cells in the column F may have a single occurrence of one of the P1:P10 strings.
I want the vba to first remove column F cells which do not have any of the P1:P10 strings.
Then, I want vba to remove P1:P10 strings from F cells leaving behind remaining contents that may be before &/or after the string.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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