ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   a Formula for a culomn in all recors (https://www.excelbanter.com/excel-programming/281124-formula-culomn-all-recors.html)

Deniom

a Formula for a culomn in all recors
 
Regards,
I am typing an invoice in Excel, I have these issues:

1. The first column is nothing but a 'No.' column which increases one unit
each record, I guess there is a way to set this column cells to just be
their above cell + 1, isn't it? I can do it for one cell but I can't set all
cells of the column to use such formula at once.

2. I have an 'Area' column which is result of multiplying length column and
width column, again it is possible to do for one record easily but I wana
set this formula for all records of my sheet

I will be really thankful is someone help me soon
best wishes

- Deniom




Tom Ogilvy

a Formula for a culomn in all recors
 
Range("A2:A500").formula = "=A1+1"

will do what you want. Using A1, rather than $A$1 allows excel to adjust
the formula for each row.

assume you are putting in a formula to multiply C2:C100 by D2:D100 row by
row

Range("E2:E100").Formula = "=C2*D2"

Again, using relative cell references allows excel to adjust the formula.

--
Regards,
Tom Ogilvy

"Deniom" wrote in message
...
Regards,
I am typing an invoice in Excel, I have these issues:

1. The first column is nothing but a 'No.' column which increases one unit
each record, I guess there is a way to set this column cells to just be
their above cell + 1, isn't it? I can do it for one cell but I can't set

all
cells of the column to use such formula at once.

2. I have an 'Area' column which is result of multiplying length column

and
width column, again it is possible to do for one record easily but I wana
set this formula for all records of my sheet

I will be really thankful is someone help me soon
best wishes

- Deniom







All times are GMT +1. The time now is 10:43 PM.

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