Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to calculate product of a sequence?

Posted on 2011-02-25
9
Medium Priority
?
345 Views
Last Modified: 2012-06-27
Please see attached image in order understand this very simple question:

Column K contains the formula I'm trying to figure out. I'm having to manually input these formulas and I'm trying to figure out a quick way to do it.

K52 =PRODUCT(1-J52)
K53 =PRODUCT(1-J52,1-J53)
K54 =PRODUCT(1-J52,1-J53,1-J54)

K55 should be = PRODUCT(1-J52,1-J53,1-J54, 1-J55)
...and so on...

Please let me know what would be a quick way to copy this formula down till row K127? Thanks.
Product-Sequence.JPG
0
Comment
Question by:Inciteful
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 9

Expert Comment

by:sshah254
ID: 34981534
K53 = PRODUCT(K52, 1-J53)
K54 = PRODUCT(K53, 1-J54)

and so on.

Ss
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34981569
Try this version

=PRODUCT(1-J$52:J52)

confirmed with CTRL+SHIFT+ENTER and copied down

Barry
0
 
LVL 81

Expert Comment

by:byundt
ID: 34981955
While both sshah254 and barryhoudini formulas work, you may prefer to dispense with PRODUCT altogether and copy down the following formula in cell K53
=(1-J53)*K52
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:Inciteful
ID: 34982468
Barry - i like your formula best.

One question though...

If I want to copy this formula across COLUMNS on another worksheet ? How would I set up the formula so that the references continue to work?

(Say the sheet in the image is called "sheet1")
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34982549
The $ fixes the row reference (makes it absolute) in the above so that when you copy down the J$52 remains J$52, if you want to copy across then it's the same principle but you use $ in front of the column letter so if you wanted to start with B4 and then add C4, D4 etc. you could use

=PRODUCT(1-$B4:B4)

then copy across

regards, barry
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34982584
Oh, I missed the sheet part, if that was on another sheet it would be like this

=PRODUCT(1-sheet1!$B4:B4)

still confirmed with CTRL+SHIFT+ENTER

....although if you want to avoid "array entering" you could add an INDEX function like this

=PRODUCT(INDEX(1-sheet1!$B4:B4,0))

regards, barry
0
 

Author Comment

by:Inciteful
ID: 34982607
Barry - when i copy that formula across columns A to Z the references dont change appropriately...
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 2000 total points
ID: 34983065
OK, I assumed you wanted to now make the references go across too, so you'd get the product of 1-B4 then the product of 1-B4, 1-C4 etc. but do you mean you want to copy the formula across but the references still go down?

If so then you can use OFFSET, e.g. if your data is on worksheet data then put this formula in B4, confirmed with CTRL+SHIFT+ENTER and copied across

=PRODUCT(1-OFFSET(data!$J52,0,0,COLUMNS($B4:B4)))

change B4 reference depending on your start cell

see attached, notice that the vertical results in Data sheet are the same as the horizontal ones in sheet1

regards, barry
26848133.xlsx
0
 

Author Closing Comment

by:Inciteful
ID: 35010592
thanks!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question