vba deleting rows that do not contain set values defined in range

后端 未结 2 1784
有刺的猬
有刺的猬 2021-01-28 13:36

I have a sheet of data with 25k lines. I need to search the entire sheet for certain words that I\'ve defined in a named range on tab 2, called \"KeywordSearh\". The range conta

2条回答
  •  遥遥无期
    2021-01-28 14:04

    Here is a non VBA way to do it. Select the range you want to alter, go to conditional formatting > highlight cell rules > more rules > use formula to determine which cells to format. Select a color to highlight the cells and type this formula with your ranges:

    =COUNTIF(FAIR!$A$1:$A$10,A1) where FAIR!$A$1:$A$10 is your keyword range and A1 is the first cell of the range you are trying to alter.

    You can then filter your list by color = no fill, select and delete only visible cells (Ctrl+G > Special > Visible Cells Only).

提交回复
热议问题