Hi,
I've got a spreadsheet where I'm trying to apply populate a formula into certain rows. In order to try and avoid lengthy loops, I'm trying to filter based on certain criteria, and just apply the formula to those rows.
So, I kept getting #REF! errors in the cells where I was populating the formula, so I've stripped it down to the very basics, and essentially, it's having trouble with the negative R[-1] in the formula. So I've got the following code:
If I replace the:
with
it all works fine, but the -1 keeps bringing up #REF! errors.
I thought it might be because the row above is not in the filtered range, but then neither is the row after (ie the R[1] row)
I have noticed that it is also adding the formula into row 1 (ie my header row) and wondered if this might be related. However, I don't understand why that would bring up an error in every row.
Does anyone have any ideas where I'm going wrong?
Thanks!
Bookmarks