Delete all cells except containing specific text

myawan

New Member
Joined
Mar 2, 2019
Messages
7
Hi,
I have a large excel file with thousands of columns.
I want to keep all column headers plus only those cells which contain specific text '2G'. Rest of the cells should be deleted so that I am only left with column header and required cells below.
Sample photos of 'Before' and 'After' scenario is attached.
'Before' scenario which shows the raw data where I have to keep only those cells having the text '2G'.
'After' scenario shows required data after cleaning done.
 

Attachments

  • 34614443-E93C-41FC-9B83-3F99F81C0492_4_5005_c.jpeg
    34614443-E93C-41FC-9B83-3F99F81C0492_4_5005_c.jpeg
    100.1 KB · Views: 8
  • A6BDA348-F2F1-4966-B56B-8F7928229A0B_4_5005_c.jpeg
    A6BDA348-F2F1-4966-B56B-8F7928229A0B_4_5005_c.jpeg
    49.3 KB · Views: 8

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Delete all cells except containing specific text
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
This query is only posted at below link, nowhere else:

 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,195
Members
449,072
Latest member
DW Draft

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