Conditional formatting VBA scripting (not IN excel) -


i've been developing script runs through txtfile, retrieves references, stores these refs in variable in form of ('ref1','ref2','ref3',...) after retrieving these refs can query our database retrieve 10 columns database.

i add result excel file, this:

if rs.bof = false or rs.eof = false     set objexcel = createobject("excel.application")     set objworkbook = objexcel.workbooks.add()     set basesheet = objworkbook.worksheets(1)      fldcount = rs.fields.count     icol = 0 fldcount - 1         basesheet.cells(1, icol + 1).value = rs.fields(icol).name     next     basesheet.range(basesheet.cells(1, 1), basesheet.cells(1, rs.fields.count)).font.bold = true     basesheet.range("a2").copyfromrecordset rs     objexcel.activewindow.zoom = 70     objexcel.columns("a:j").select     objexcel.selection.entirecolumn.autofit     basesheet.range("a2").copyfromrecordset rs     objexcel.visible = true else     msgbox ("geen speciale gevallen")     exit function end if set objexcel = nothing set objworkbook = nothing set basesheet = nothing 

my question : can run through objexcel column "j" , test value (if instr(contents of column "j", "400 - 700") > 0 then backgroundcolor cell = yellow)?

i can't disclose other parts of code since lengthy , might reveal work etc.

to clear not in excel, in attachmate reflection ibm terminal.

something might :

with activesheet     = 1 .cells(.rows.count, "j").end(xlup).row         if instr(1, .cells(i, "j"), "400 - 700") <= 0         else             .cells(i, "j").interior.pattern = xlsolid             .cells(i, "j").interior.patterncolorindex = xlautomatic             .cells(i, "j").interior.color = 65535         end if end 

Comments