excel - Copy specific cell contents into new sheet with VBA -
i in need of help. trying copy contents of cells in 1 sheet sheet in same project. below have vba code helps me copy cells sheet. problem each cell contains more content need them to.
for instance have:
"packets: sent = 10, received = 10, lost = 0 (0% loss)"
all need above "0" (or whatever percentage happens be. )how can automate adding functionality below code.
private sub commandbutton1_click() dim lr long, long, cls cls = array("a13", "a14", "a15", "a16") sheets("sheet2") lr = worksheetfunction.max(6, .range("a" & rows.count).end(xlup).row + 1) = lbound(cls) ubound(cls) .cells(lr, + 1).value = me.range(cls(i)).value next end end sub
thank you!
assuming text me.range(cls(i)).value
change contents of loop to
percentstr = me.range(cls(i)).value .cells(lr, + 1).value = val(mid$(percentstr, instr(percentstr, "(") + 1))
Comments
Post a Comment