Adding a value to blank cells

R

Rugby Al

I have a spreadsheet with a number of blank cells in a column, I want to fill
these cells with a another cell value from a different column, the value
will need to change every time a non blank cell is reached, as will the data
to be put in to the next section of blank cells. I can send a small sample of
data if required.

Regards
 
E

exceluserforeman

sub Blank_Cells_with_Values()
dim CELL

range("A1").select
set a=selection
range(a,a.specialcells(xllastcell)).select
for each CELL in selection

if CELL.Text="" then
CELL.value=cell.offset(0,3).value
end if
next
end sub

cell.offset(0,3).value is the third colmn (on the same row) from the cell
being evaluated. So the blank CELL will have that value.

http://www.geocities.com/excelmarksway

- -Mark
 
R

Rugby Al

Thanks for the info Mark, but still very confused, I could send a sample of
the data if it would help

Regards
 
Top