Share via

Using "product" function with "Offset"

Anonymous
2015-08-08T13:56:51+00:00

I have a challenge in using the "Product" function with "offset".  

Let's assume I have a single row with a sequence of returns across each of 10 columns:

1.01     1.02     1.03     1.04    1.05  1.02   1.034 1.08   1.02    1.24            4

I wish to calculate the product of the first values, for example; more importantly, I wish to be able to change the # of values to be included in the "product" function.  For example, I wish to be able to set the # of values as a variable (see the last value in the row) so that the function calculates as follows:  product(a1:d1) -- i.e. the first 4 values.  Similarly, if the value in the last column is 6, then I wish to calculate product (a1:f1:) where the # of values included in the PRODUCT function is determined by the value in a specific cell.  There is where I see the use of the "offset" function in some fashion, but I don't know how to do this.

Any suggestions?

Thanks.

E

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2015-08-08T14:06:13+00:00

Let's say the number of cells to include is in Z1. You can use

=PRODUCT(OFFSET(A1,0,0,1,Z1))

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Vijay A. Verma 104.8K Reputation points Volunteer Moderator
    2015-08-08T14:07:39+00:00

    Assuming 4 is in L1 and your range is in A1:J1, use below formula -

    =PRODUCT(A1:INDEX(A1:J1,L1))

    Was this answer helpful?

    0 comments No comments