excel - VBA - find empty cells, set equal to "EMPTY" -


code finds values sheets , copies them on 1 sheet. if column empty, prints "no items".

i need make so, once done copying items over, finds blank cells in column "b" (startsht, "b") , range of last occupied cell of "c" up, fills string "empty"

any ideas how go doing that?

it (1) , need (2)

(1)

enter image description here

(2)

enter image description here

set dict = getvalues(hc3.offset(1, 0)) if dict.count > 0                       'add values master list, column 2     set d = startsht.cells(rows.count, hc1.column).end(xlup).offset(1, 0)     d.resize(dict.count, 1).value = application.transpose(dict.items) else     'if no items under holder header     startsht.range(startsht.cells(i, 2), startsht.cells(getlastrowincolumn(startsht, "c"), 1)) = " no items " end if 

blank cells easy find specialcells function. same using goto (or hitting f5) , choosing blanks.

startsheet.range("b:b").specialcells(xlcelltypeblanks).value = "empty" 

you can same column c after building appropriate range.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -