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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top