Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Replace() Range Function

Of course, that code requires an "End With" toward the bottom....

For J = 1 To 12
With oRange.Cells(J, 1)
If .Value < "" Then
objOther.Replace .Value, .Offset(0,1).Value
End If
End With
Next

Sorry about that,
Bernie
MS Excel MVP

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Anyway, the upshot of the above is that you could try changing your code

to:

Dim oRange As Range
Set objOther = sht2.Range("A4:H850")
Set oRange = shtTotals.Cells(8, 1)

For J = 1 To 12
With oRange.Cells(J, 1)
If .Value < "" Then
objOther.Replace .Value, .Offset(0,1).Value
End If
Next



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
Speed of Replace Range Monk[_2_] Excel Discussion (Misc queries) 6 May 24th 08 04:57 AM
multi range identify & replace Muralikrishnan Excel Worksheet Functions 0 February 24th 08 03:02 PM
replace null cells within a range to 0 Abbey Normal Excel Discussion (Misc queries) 5 August 29th 07 01:54 AM
replace a range of #'s e.g. 1.25 to 100 with text in excell Painter Excel Worksheet Functions 1 December 27th 05 08:36 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


All times are GMT +1. The time now is 09:24 AM.

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"