Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calculating a cell

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Calculating a cell

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


--


Gary


"nabboo22" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating a cell reference HalB Excel Programming 2 March 18th 07 06:05 PM
calculating hours in one cell CYLON Excel Worksheet Functions 1 August 18th 06 07:24 AM
Calculating from last inputted cell Petermac New Users to Excel 3 May 31st 06 02:11 PM
Calculating cell references YoungGuy[_3_] Excel Programming 4 March 7th 06 05:01 PM
Exclude a cell from calculating Drew Excel Worksheet Functions 2 February 4th 05 08:05 PM


All times are GMT +1. The time now is 09:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"