LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
tim tim is offline
external usenet poster
 
Posts: 105
Default Cell Reference in a Macro

I am looping through a macro, testing the contents a data
in column A. If I find a "P" in the first position clomun
A, I want to capture the value, if there is one, in column
C and column D in that row. I want to keep a running
balance of the sum of those values by column.

I am not sure how to reference those cells when I find
a "P" in column A.

Range("A1").Select
For I = 1 to 100
If Left((ActiveCell,1)="P" Then
TotalC = TotalC + ???
TotalD = TotalD + ???

How do I reference the cells in C and D to add the values
to the running totals?

Something like ActiveCell.Offset(0,2).Value?

TIA.
 
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
Macro using a cell reference Jason Falzon[_2_] Excel Discussion (Misc queries) 3 March 24th 10 04:16 PM
absolute cell reference macro rk0909 Excel Discussion (Misc queries) 4 November 7th 09 12:37 AM
Cell Reference Macro Scott Excel Discussion (Misc queries) 3 June 16th 09 04:13 PM
cell reference in macro AJB Excel Discussion (Misc queries) 2 August 7th 07 04:22 PM
run a macro from a cell reference spence[_3_] Excel Programming 2 December 9th 03 09:36 PM


All times are GMT +1. The time now is 07:03 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"