Thread: do loop
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Lost in Alabama Lost in Alabama is offline
external usenet poster
 
Posts: 26
Default do loop

Thanks to both you and Tim,

The following works great.


Dim Cell As Range

For Each Cell In Range("H:H")
If Cell.Value = "ZZZTotal" Then
Cell.Offset(1, 10).Formula = "=" & Cell.Offset(0, 10).Address(False, False)
End If
Next Cell

You Guys are GREAT!!

Mary




"Lost in Alabama" wrote:

Charile,

Thanks for the quick response. This works except I need the value contained
in the cell found in Column R to be one cell up in Column R.

Thanks,

Mary


"Charlie" wrote:

Dim Cell As Range

For Each Cell In Range("H:H")
If Cell.Value = "ZZZ Total" Then
Cell.Offset(1, 10).Formula = "=" & Cell.Offset(-1, 0).Address(False,
False)
End If
Next Cell


"Lost in Alabama" wrote:

I need a Do Loop to perform the following:

Select Column H
Find "ZZZ Total"
From that Active Cell, move 10 columns to the right and one cell down
Insert Formula "=Active Cell -1"
Loop until Column H cell value = ""

Thanks for the Help!

Mary