excel - Fill blank cells (Variation) -


i have issue filling blank cells of column.

i have 3 column headings in a, b, c.

under have variable amounts of rows, column , b have data.

column c have gaps. how similar to: edit > go > special > blanks, type = in formula bars, hit arrow ctrl+enter

except, macro going until last row of , no further.

i have:

sub fillcellsfromabove()     ' turn off screen updating improve performance     application.screenupdating = false     on error resume next     ' in column     columns(3)         ' blank cells, set them equal cell above         .specialcells(xlcelltypeblanks).formula = "=r[-1]c"         'convert formula value         .value = .value     end     err.clear     application.screenupdating = true end sub 

it fills right bottom of page , not last "a" value is.

don't use of column c -- first determine how far data in column extends , grab many cells in column c:

sub fillcellsfromabove()     dim r range, n long      n = range("a:a").rows.count     n = cells(n, "a").end(xlup).row     set r = range(cells(1, 3), cells(n, 3))      application.screenupdating = false     on error resume next     r         ' blank cells, set them equal cell above         .specialcells(xlcelltypeblanks).formula = "=r[-1]c"         'convert formula value         .value = .value     end     err.clear     application.screenupdating = true end sub 

Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -