ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referring to non constant columns (https://www.excelbanter.com/excel-programming/375376-referring-non-constant-columns.html)

Jill1

Referring to non constant columns
 
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

Gary L Brown

Referring to non constant columns
 
Jill,
It's not that we don't want to help you. We can't figure out what you're
talking about.
In your two posts, you're mixing column and row syntax, trying to sum
text, not telling what you're 'find'ing that you are also adding (text and
numbers added together come out to -0- or an error).
Try to be more specific and watch your syntax.
HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"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


[email protected]

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




All times are GMT +1. The time now is 05:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com