a Formula for a culomn in all recors

  • Thread starter Thread starter Deniom
  • Start date Start date
D

Deniom

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
 
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.
 
Back
Top