View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] acampbell012@yahoo.com is offline
external usenet poster
 
Posts: 129
Default Referring to non constant columns

Try:

Range("D" & ActiveCell.Row, Range("D" & irow)).Formula = icol + icol


Jill1 wrote:
I have the following problem

Todays Data
Col A Col B Col C Col D
Oranges Bananas Total Oranges & Bananas

Tomorrows Data
Col A Col B Col C Col D
Oranges Pears Bananas Total Oranges & Bananas

I use a find to see which column is holding Oranges & Bananas, this is
working fine. However I want to refer to the whole of Column D as a range
and fill this range with the formula. Can anyone tell me how to enter the
formula in the code
eg. Range("D" & ActiveCell.Row & ":D" & iRow).Formula = iCol + iCol