View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Chip Smith Chip Smith is offline
external usenet poster
 
Posts: 10
Default formual in macro

i do apologize i meant to say columns, not rows. my mistake
--
--Chip Smith--



"PCLIVE" wrote:

Cells(c.Row, 2).Value = Cells(c.Row, 2).Value + ((Me.txtShip.Value / _
Me.txtPart.Value) * Me.txtPart.Offset(0, 2).Value)

"Chip Smith" wrote in message
...
i am having a problem rewriting the formula in my macro, i'm trying to
multiple the value of a cell that is to rows over to the right, however it
doesn't work as planned. any insight?

Private Sub cmdAdd_Click()
Dim Order As String
Dim Index As Variant
Dim nextrow As Long
Order = txtOrder.Value


With Range("K:K")
Set c = .Find(Order, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Cells(c.Row, 2).Value = Cells(c.Row, 2).Value + ((Me.txtShip.Value /
Me.txtPart.Value) * the value of a cell that is 2 rows to the right)

Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With

End Sub
--
--Chip Smith--