Formula works in one row, but same formula (copied and pasted) will not work in other rows.

I have a formula that, if there is a number in the box, multiplies it by a price, then sums the results in a final column. I copied it into 7 rows. It changed the row numbers as necessary, the formulas all look right, but nothing I seem to do make the other 6 work, unless I fill all the empty cells in the row with 0. Oddly, the one that does work is not the original row I typed the formula into, and it has empty cells.


Here is the formula, each column has a product, so the cell is multiplied by a number, that number being the cost of the product. If there is no product sold, the cell is empty, so it is 0.


IFERROR((B6×50)+(C6×30)+(D6×60)+(E6×40)+(F6×30)+(G6×25)+(H6×25)+(I6×20)+(J6×20)+ (K6×25)+(L6×20)+(M6×15)+(N6×10)+(O6×10)+(P6),0)


Ideas?


Thanks!

MacBook Pro, OS X Mountain Lion (10.8.4)

Posted on Sep 6, 2016 8:22 AM

Reply
4 replies

Sep 6, 2016 9:54 AM in response to Maddog_Walby

Here is a way to do what you described:


I am assuming the constant multipliers are unchanging when this is used on different rows..


User uploaded file


In this example, the multipliers are stored on the first row (but can be anywhere you like).

A2=SUMPRODUCT(B$1:P$1, B2:P2)


this is shorthand for... select cell A2, then type (or copy and paste from here) the formula:

=SUMPRODUCT(B$1:P$1, B2:P2)

select cell A2, copy

select cells A2 thru the end of column A, paste



The constants are set up like this:

User uploaded file


Here is the table already set up (you can copy and paste from here) then you need to just add the formula:


50

30

60

40

30

25

25

20

20

25

20

15

10

10

1

381

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

50

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

30

0

1

0

0

0

0

0

0

0

0

0

0

0

0

0

60

0

0

1

0

0

0

0

0

0

0

0

0

0

0

0

40

0

0

0

1

0

0

0

0

0

0

0

0

0

0

0

30

0

0

0

0

1

0

0

0

0

0

0

0

0

0

0

25

0

0

0

0

0

1

0

0

0

0

0

0

0

0

0

25

0

0

0

0

0

0

1

0

0

0

0

0

0

0

0

20

0

0

0

0

0

0

0

1

0

0

0

0

0

0

0

20

0

0

0

0

0

0

0

0

1

0

0

0

0

0

0

25

0

0

0

0

0

0

0

0

0

1

0

0

0

0

0

20

0

0

0

0

0

0

0

0

0

0

1

0

0

0

0

15

0

0

0

0

0

0

0

0

0

0

0

1

0

0

0

10

0

0

0

0

0

0

0

0

0

0

0

0

1

0

0

10

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

50

1















60



1













30





1











20









1







This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Formula works in one row, but same formula (copied and pasted) will not work in other rows.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.