Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Excel 2000 -Range


Those little dots are important. Close doesn't count. <g

"Rows.Count" returns the number of rows on the worksheet.
"Range("RANGEMAT").Rows.Count" returns the number of rows
in the range.

"Replace" won't work on empty cells. The first example uses an "x"
as the item to replace. The second example just adds the text to the cells...
'------------------
Sub FirstTry()
With Range("RANGEMAT")
.Offset(1, 0).Resize(.Rows.Count - 2, 1).Replace What:="x", _
Replacement:="Check", LookAt:=xlPart, _
SearchOrder:=xlByColumns, MatchCase:=False
End With
End Sub
'--------------------
Sub SecondTry()
With Range("RANGEMAT")
.Offset(1, 0).Resize(.Rows.Count - 2, 1).Value = "Check"
End With
End Sub
------------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Gerry Cornell"
wrote in message
Jim or any other kind soul who can help
Trying to modify Jim's suggestion has hit problems

Range("RANGEMAT").Select
Range ("RANGEMAT").Offset(1,0).Resize(Rows.Count - 2, 1)
Selection.Replace What:="", Replacement:="Check", LookAt:= _
xlPart, SearchOrder:=xlByColumns, MatchCase:=False

Each time I try to correct Line 2 it throws up another problem. I
haven't got as far as testing Line 3 and 4.

Line 2 is intended to omit the first and last cell in the Range
"RANGEMAT" and line 3 and 4 to enter the word Check in each cell in
RANGEMAT except the first and last cells.
TIA
--
~~~~
Gerry
~~~~~~~~
Enquire, plan and execute.
Stourport, England
~~~~~~~~~~~~~~~~~
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
conditional format range set-up in Excel 2000 Ellie Excel Worksheet Functions 5 October 25th 06 09:28 AM
allow users to edit a range in excel 2000 jimar Excel Discussion (Misc queries) 6 August 24th 05 08:12 PM
Excel 2000 VBA - Set Print Range in dynamic range sub_pop[_5_] Excel Programming 2 July 27th 04 08:01 PM
Excel 2000 VBA - Selecting populated range sub_pop[_4_] Excel Programming 1 July 27th 04 05:37 PM
SOS:Know Deleted/Inserted Range in Excel 97/2000 Von Shean Excel Programming 1 December 24th 03 07:46 AM


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