Vba find & replace a number by a macro.Excel -
i'm making heuristic analyse , have following problem:
i want find in column d numbers match column j , replace them "0". can see i'm trying on image: http://imageshack.us/f/96/heuristic.jpg/
some parts of code:
dim i,j integer dim temp string dim x integer dim d string = application.counta(range("e:e")) + 10 'number of cell values j = application.counta(range("j:j")) + 10 j = 11 j temp = range("j" & j).value = 11 d = range("d" & i).value * next next
at *
lies problem, can't figure out how pass on comma ","
in column d, , store data. want compare temp value on "d"
, "d"
. can have multiple numbers on same cell, "3,2,1"
, , if there match temp = 3, d= "0,2,1"
.
english not native language hope can understand want.
there's no need vba. standard excel functions work:
- make new column somewhere near column d.
- in new column, use formula
=if(iserror(vlookup(d11,j:j,1,false)),d11,0)
. formula looks value of d11 in column j. if match found, 0 returned. otherwise, d11 returned. - if want, can hide column d avoid confusion.
if have multiple times, may want have unformatted 'raw data' tab , clean 'display tab'. help?
Comments
Post a Comment