Define column B as a Range
ColumnB.Select
Dim Cell As Range
For Each Cell In Selection
If cell. value ="" then Cell.offset(0,1).value =
etc...
Next Cell
Should work
-----Original Message-----
Hi, I was hoping that someone might be able to help me.
I have a list of data that can change in length in terms
of rows, but I
want to have a macro that will paste a formula into the
adjacent cell
for every non-blank cell within the data set.
ie Column B has 84 rows this time, I want to put a
formula in Column C
for the matching number of rows, but when I run the
macro next time, I
want it to be able to do the same thing if there is 90
or 40 rows in
Column B.
Any help greatly appreciated!
Thanks,
Paul
---
Message posted from http://www.ExcelForum.com/
.