Rows added after refresh not in formula
OK, I now see that by showing null my problem of aesthitics goes away.
"Roger Govier" wrote:
Hi Greg
=F6="","",F6*$G$5
Brain fade, that should have read
=IF(F6="","",F6*$G$5)
In other would if null, then use null or use the formula.
Yes, you could have some code to automatically pasted the formula down
the used range(s) after you have imported your data.
I don't have time to write it right now, as dinner is on the table
(perhaps what why the brain was fading <g), so if you don't have a
response posted by anyone else to provide the code, I will write it
later or tomorrow.
--
Regards
Roger Govier
"Greg Snidow" wrote in message
...
Thanks Roger, that was fast again. The problem is that since the data
are
sorted according to the ORDER BY clause in my view in SQL2K new rows
are
usually not added at the end, but in the middle. I tried to drag the
formula
down to way below where the data will ever be, but still if a new row
is
added between the data in row 10 and 11 for example, making what is
currently
in row 11 to be row 12 the new row 11 is not contained in the formula.
Is
there somewhere I can go to learn about making a macro to do it,
because that
is way over my head? And what do the "","" do in the alternative
formula you
posted do. I tried entering that formula in a cell but it was giving
me an
error. I am using Excel 2003.
"Roger Govier" wrote:
Hi Greg
In XL2003 there is a feature called DataListsCreate List
Any table set up through this method will automatically have new
formulae created when you append data to the end of the list.
For earlier versions of XL, you have to extend the formulae yourself,
or
have a macro to do it.
You could amend the formula to
=F6="","",F6*$G$5
and have it go down the sheet way beyond where your current data is,
so
the formula is automatically there as you enter new data at the end
of
the table.
You could used Dynamic named ranges to deal with just the used range
in
your calculations, rather then the whole range including the "blank
other than formulae" rows at the end of your table.
--
Regards
Roger Govier
"Greg Snidow" wrote in message
...
Greetings all. I know I saw the answer to this one recently, but I
can not
find it now. I have a workbook with worksheets linked to SQL2K. I
have many
formulas like =F6*$G$5. I drag the formula down to one row below
the
last
row of data on the sheet, and everything works as it should. The
problem is
that when I refresh the data if any rows are added they are not
included in
the formula, eventhough they are added above where I dragged the
formula. Is
there an easy way to make any new rows be included in the formula?
Thank
you.
|