Reputation: 3814
I have a global range, let's say for instance A1:A18
, that contains value of the same type (only integers or only real numbers) and maybe also empty cells.
Data is dynamically outputted (through an excel function fetching data) in this range : sometimes the whole range contains non empty cells, sometimes not, with the following properties :
Now, in some cell not in the global range, I have the formula =F(A1:18)
where F
works only for ranges with non empty cells. If my range A1:A18
finishes with empty-cell (and this may well happen), the formula is going to throw an error.
Imagine range 1 is A1:A4
. By which (necessarily matrix) formula G(A1:A18,...)
depending only on range A1:18
, on official excel functions (that is not user-defined excel functions) and not on VBA could I replace the range A1:18
in =F(A1:18)
so that =F(G(A1:A18,...))
would in fact calculate =F(A1:A4)
? In others terms : which formula (with aforementioned conditions) gives dynamically A1:A4
from A1:A18
?
I have also the same question with "#N/A
" instead of empty and with "#VALUE!
" instead of "empty".
Upvotes: 0
Views: 165
Reputation: 3814
G(A1:A18)=OFFSET(A1,0,0):OFFSET(A1,COUNTA(A1:18)-1,0)
does the job
Upvotes: 0