ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   looking for simplified formulas (https://www.excelbanter.com/excel-worksheet-functions/92324-looking-simplified-formulas.html)

philip

looking for simplified formulas
 
I have formulas as following:
=(B1-A1)+(C1-B1)+(D1-C1)+(E1-D1)+..........+(AB1-AA1)

Is any one can help???

thanks
philip

Dana DeLouis

looking for simplified formulas
 
looking for simplified formulas

Hi. Most of your variables cancell out.
This part:
=(B1-A1)+(C1-B1)+(D1-C1)+(E1-D1)
Reduces to
E1-A1

(Did you mean multiply? =(B1-A1) * (C1-B1) *...)
--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"philip" wrote in message
...
I have formulas as following:
=(B1-A1)+(C1-B1)+(D1-C1)+(E1-D1)+..........+(AB1-AA1)

Is any one can help???

thanks
philip




VN

looking for simplified formulas
 
Hi, Philip.

" =(B1-A1)+(C1-B1)+(D1-C1)+(E1-D1)+..........+(AB1-AA1)
"

above formula can rewrite as below:-

=AB1-A1


What is your meanning.. ?
Is something wrong in your post ?


philip

looking for simplified formulas
 
thank you for your reply, however, I need to explain a bit more, the
scenarios as follow

A B C D E F G CONT.....
2 4 6 7 9 11 23


the column will be continue to column AB

what I need is (col"B"-col"A")+(col"C"-col"B")...and so on...

the formula will be :=(B-A)+(C-B)+(D-C)+(E-D)-(F-F)+(G-F)....Ans is 19


thanks again
Philip

David Biddulph

looking for simplified formulas
 
"philip" wrote in message
...
thank you for your reply, however, I need to explain a bit more, the
scenarios as follow

A B C D E F G CONT.....
2 4 6 7 9 11 23


the column will be continue to column AB

what I need is (col"B"-col"A")+(col"C"-col"B")...and so on...

the formula will be :=(B-A)+(C-B)+(D-C)+(E-D)-(F-F)+(G-F)....Ans is 19


I assume you meant ... +(F-E) ..., rather than ... -(F-F) ...?

In which case the answer is 21 (not your 19), and (as has already been
pointed out) in the more general case, as the intermediate terms all cancel
out, the answer is the last column minus the first, or =(AB1-A1).
--
David Biddulph



philip

looking for simplified formulas
 
thanks
however, how to setup a formula, so that , when I add the number in the last
column, it can be automatically use the last column to subtract the first
column, for example, column G is the last column, if I add the number in
column H, the formula can automatically use the column H to subtract the
column A

thanks again

philip


"David Biddulph" wrote:

"philip" wrote in message
...
thank you for your reply, however, I need to explain a bit more, the
scenarios as follow

A B C D E F G CONT.....
2 4 6 7 9 11 23


the column will be continue to column AB

what I need is (col"B"-col"A")+(col"C"-col"B")...and so on...

the formula will be :=(B-A)+(C-B)+(D-C)+(E-D)-(F-F)+(G-F)....Ans is 19


I assume you meant ... +(F-E) ..., rather than ... -(F-F) ...?

In which case the answer is 21 (not your 19), and (as has already been
pointed out) in the more general case, as the intermediate terms all cancel
out, the answer is the last column minus the first, or =(AB1-A1).
--
David Biddulph




VN

looking for simplified formulas
 
you can be automatically use the last column to subtract the first
column by using this formula.

=INDEX(A1:AB1,MAX(IF(ISNUMBER(A1:AB1),COLUMN(A1:AB 1))))-$A$1


Make sure that you press Ctrl+Shift+Enter for input array formula.


Hope this maybe useful.
VN.



All times are GMT +1. The time now is 03:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com