Hi,
Using excel formulas, how do find an sum of first n values of an array? Each cell in the array may or maynot contain a number, ignore non-numbers in an array? If n is greater than count of number then add all numbers present in the array.
In each case I would like to find the count of numbers that were added.
example
The array (column) contains numbers OR a letter "Y". eg
1,45,Y,32,56,Y,12,Y,Y,16,18.
if n = 2 ,then I want to calculate sum of 1 and 45, and count to return 2.
if n = 3 , then I want to calculate sum of 1,45 and 32 (ignoring "Y") and count to return 3.
if n = 7 ,then I want to calculate sum of 1,45,32,56,12,16,18 (ignoring "Y") and count to return 7.
if n = 9 ,then, I want to sum of 1,45,32,56,12,16,18 (ignoring "Y") and count to return 7 (in this case return count is < n).
if possible I do not want add any extra rows or coloums in the spread sheet to store intermediate data.
Thanks for the help.
Using excel formulas, how do find an sum of first n values of an array? Each cell in the array may or maynot contain a number, ignore non-numbers in an array? If n is greater than count of number then add all numbers present in the array.
In each case I would like to find the count of numbers that were added.
example
The array (column) contains numbers OR a letter "Y". eg
1,45,Y,32,56,Y,12,Y,Y,16,18.
if n = 2 ,then I want to calculate sum of 1 and 45, and count to return 2.
if n = 3 , then I want to calculate sum of 1,45 and 32 (ignoring "Y") and count to return 3.
if n = 7 ,then I want to calculate sum of 1,45,32,56,12,16,18 (ignoring "Y") and count to return 7.
if n = 9 ,then, I want to sum of 1,45,32,56,12,16,18 (ignoring "Y") and count to return 7 (in this case return count is < n).
if possible I do not want add any extra rows or coloums in the spread sheet to store intermediate data.
Thanks for the help.
