Thread: Macros 101,
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Hirsch
 
Posts: n/a
Default Macros 101,

Bob, is there any formula similar to

Cells.offset(1,0).activate

I think this offset function could work, but I'm not familiar enough with it.




"Bob Phillips" wrote:

If it is one column that you will look in, you could use

On Error Resume Next
iRow = Application.Match("Grand Total, Range("A:A"),0)
On Error Goto 0
If iRow 0 Then 'found
Cells(iRow,"A").Offset(1,0).Formula = ??
Cells(iRow,"A").Offset(1,1).Formula = ??
...

If it is multi-column, take a look at Find in VBA Help.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Hirsch" wrote in message
...
I am trying to locate a specific string of letters and go either up down
left or right of this string of letters and do some calculations.

for example.

find "Grand Total"
drop down one line and enter in this formula, then drop down one line and

to
the right and enter in this formula.

(my problem is when the string of letters "Grand Total" floats from line

50
to line 60