View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Pascal[_4_] Pascal[_4_] is offline
external usenet poster
 
Posts: 5
Default can anybody help me

Hi Ke

lets say somewhere in colom
there is a cell with value "BOD
and I want to read the data range starting below this cell until "EOD
how would I prosee

regards Pasca

----- Ken Wright wrote: ----

Just as an example, the following snippet uses the Find method to find a valu
in a range, and then uses offset on the cell the value is found in to do som
comparisons:

Set SearchMe = Sht2.Range("A1:A" & LRowSht2
y =

For r = LRowSht1 To 1 Step -
Set findme = Sht1.Cells(r, 1
With SearchM
Set found = .Find(what:=findme, LookIn:=xlValues
If Not found Is Nothing The
fnd =
For z = 1 To
If found.Offset(0, z).Value <
findme.Offset(0, z).Value The
fnd = fnd +
End I
Next

If fnd 0 The

--
Regard
Ken....................... Microsoft MVP - Exce
Sys Spec - Win XP Pro / XL 00/02/0

---------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-
---------------------------------------------------------------------------



"Pascal" wrote in messag
..
How can I find a cell with a certain content and then read a range relativel

to this cel


--
Outgoing mail is certified Virus Free
Checked by AVG anti-virus system (http://www.grisoft.com)
Version: 6.0.608 / Virus Database: 388 - Release Date: 03/03/200