Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rugby Al
 
Posts: n/a
Default Adding a value to blank cells

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
exceluserforeman
 
Posts: n/a
Default Adding a value to blank cells

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








"Rugby Al" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
Rugby Al
 
Posts: n/a
Default Adding a value to blank cells

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

Regards

"exceluserforeman" wrote:

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








"Rugby Al" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting Blank Cells Wholesale? Trey Excel Discussion (Misc queries) 1 October 6th 05 09:37 PM
How can I replace a range of blank cells with a 0 Replacing blank cells Excel Discussion (Misc queries) 1 August 19th 05 12:01 AM
CONCATENATE problem with blank cells roger_home Excel Discussion (Misc queries) 1 August 17th 05 09:18 PM
Copy down - special to fill only the blank cells Mike Excel Discussion (Misc queries) 3 April 18th 05 10:08 PM
Non Blank - Blank Cells???? Reggie Excel Discussion (Misc queries) 3 January 12th 05 12:04 AM


All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"