LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default replace blanks with values above

Hi,

I know this topic has already been posted and since I don't know VB
excel programming, I used the code from a previous post to achieve
what i want.

I need to search for blank values in a range and replace them with the
value above.

My code:

Sub BlankRepeats()

For Each cell In Range("A2:A35")
If cell.Value = "" Then
cell.Value = cell.Offset(-1, 0).Value
End If
Next cell
End Sub

It iterates through the entire range and doesnt seem to pick up any
values as though all are blanks and hence no changes are made.
Meanwhile the column A has text values in many rows.

Will appreciate some help.

Thanks

Susan
 
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
Replace values in shaded cells with blanks sue Excel Discussion (Misc queries) 3 January 11th 07 01:20 AM
Search and replace blanks SamanthaK Excel Programming 7 June 15th 06 12:04 PM
replace blanks using formula susiecc60 Excel Worksheet Functions 1 March 27th 06 02:16 AM
Need to get rid of 0's and replace with Blanks Intuit Excel Worksheet Functions 3 February 3rd 06 08:55 PM
replace "#DIV/0!" error with blanks Mark B Excel Worksheet Functions 0 June 22nd 05 10:19 AM


All times are GMT +1. The time now is 10:04 AM.

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

About Us

"It's about Microsoft Excel"