LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Replace Error with Empty Cell

Sub ABC()
Dim rng as Range, cell as Range
set rng = Range("B1",Cells(rows.count,2).End(xlup))
for each cell in rng
if not iserror(cell) then
cell.offset(0,1).Value = cell.Value
end if
Next
End Sub

--
Regards,
Tom Ogilvy


"raparipa" wrote:

A B
01.01.1976 27760
#VALUE!
01.01.1978 28491

Column A has date in txt and blank but not empty cells. Column B has Formula
A1*1 filled down by macro. Blank cells in column A give error. How I could
make a macro that makes column C wich is like column B, but has replaced
error cells with empty cells.

 
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
Find Replace list empty Robert H Excel Discussion (Misc queries) 0 February 6th 07 04:41 PM
Replace all empty or " by the content of the cell above it hccatmo Excel Worksheet Functions 3 November 9th 06 08:52 PM
Given a range of cells, some of which contain errors (e.g. #DIV/0), replace each cell having an error with the value of a non-error precedent cell Barclay0x00 Excel Programming 3 October 24th 05 05:12 PM
Need help: how to semi-automatically replace an empty value in a row with a row average? Fred[_25_] Excel Programming 1 September 30th 05 08:45 PM


All times are GMT +1. The time now is 11:51 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"