Calculating a cell

N

nabboo22

Hello

I need to scroll down column C until it finds "Grand Total". Afterwards
make the value of J2 equal to the value of the cell on the same row as "Grand
Total", but column P.

Thanks in advance for the help.

Regards,
John
 
G

Gary Keramidas

give this a try

Sub test()
Dim rngfound As Range
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")

With ws.Columns("C")
Set rngfound = .Find("Grand Total", lookat:=xlWhole,
LookIn:=xlValues)
End With
If Not rngfound Is Nothing Then
With ws
.Range("J2") = .Range("P" & rngfound.Row).Value
End With
End If
End Sub
 
Top