if cell=value select range and either clear contents or delete rows

maxx_daddy

Board Regular
Joined
Dec 3, 2010
Messages
74
Hi All,
I have a sheet that duplicates the header when exported.
I want to search a column and if a certain value exists either select a range surrounding the active cell and clear the contents or better yet select the rows containing the header and delete them.
I should be able to write the seach, but having some trouble with selecting active rows or generating the range.

thanks
Joe (Maxx's Daddy!)
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi Joe
What value do you want to search for and in which column ??
 
Upvote 0
Lets just say for grins that I want to search column G for a cell that has the words "pink elephant"
and i want to pick a range of cells 5 up and 6 down and 20 to the right and 5 to the left and clear contents or I could just go 5 rows up and 6 rows down and entire row delete. thanks as always and it's good to be back.
joe (maxx's daddy)
 
Upvote 0
I fixed this by changing some ranges around. While this would still be handy to know how to do, This is done.
 
Upvote 0

Forum statistics

Threads
1,203,667
Messages
6,056,645
Members
444,879
Latest member
suzndush

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