excel vba - I have a vba macro, that copy down the last cells value and highlights the bold text with red color -
i have vba macro code, copy down last cells value , highlights bold text red color.
there 1 problem occurring in last cell, although copy down last cell value of grouped cells, not highlights bold text red color.
check screenshot: http://i.stack.imgur.com/ydqjk.jpg 
here vba code:
sub copy_down() dim r range, rr range, n long n = cells(rows.count, "a").end(xlup).row set r = range(cells(1, "a"), cells(n, "a")).specialcells(xlcelltypeblanks) each rr in r rr .filldown .font.bold = true .font.color = rgb(255, 0, 0) end next cells(n + 1, "a").filldown end sub please check code, , suggest me should do?
i assuming code have provided before picture has blanks, want fill in blanks cell above , color red , bold. including below last cell.
here picture getting code provided.
this interpretation on how that.
sub blank_it() dim r range, rr range, n long n = cells(rows.count, "a").end(xlup).row + 1 set r = range(cells(1, "a"), cells(n, "a")) each rr in r.cells if isempty(rr) rr .value = .offset(-1).value .font.bold = true .font.color = rgb(255, 0, 0) end end if next rr end sub 
Comments
Post a Comment