excel - VBA code takes long time to execute -


the followinf vba code takes long time execute

dim rngcol1 range dim rngcol2 range dim myvalue long dim c range  set rngcol1 = thisworkbook.sheets("reviews").range("d1:d30" & range("d" & rows.count).end(xlup).row) set rngcol2 = thisworkbook.sheets("input").range("m3")  each c in rngcol1     on error resume next     if iserror(myvalue = worksheetfunction.match(c.value, rngcol2, 0))     else         c.font.color = vbred     end if next 

if code can modified run fast. or, if alternative vba code can written highlight value(in red color) in worksheet "reviews" of column range "d1:d30" when matches in worksheet "input" of cell number "m3". thanks

i tackle conditional formatting rule.

dim addr string activeworkbook.worksheets("reviews")     .range(.cells(1, "d"), .cells(.rows.count, "d").end(xlup))         addr = .cells(1).address(false, true)         .formatconditions.delete         .formatconditions.add(type:=xlexpression, formula1:="=and(" & addr & "='input'!$m$3, not(isblank(" & addr & ")))")             .interior.color = 255    'red         end     end end 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -