ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need Help with SUM function (https://www.excelbanter.com/excel-worksheet-functions/40063-need-help-sum-function.html)

spackler

Need Help with SUM function
 

I have a software program that kicks out Excel reports with data from
its fields and I need to add the cells up. I can put the =SUM(A1:D1)
formula in a field within the software so it adds up A1 through D1 no
problem but the simple =SUM(A1:D1) then shows up in row 2. So where it
should be =SUM(A2:D2) Excel is taking the literall text in the field so
it is not working beyond row 1. I get =SUM(A1:D1) in all rows.

My thinking is to come up with a formula that uses the ROW() function
to tell the next cell down to use the proper formula so I'm trying
=SUM(A(ROW()):D(ROW())) and it is not working. I think I'm on the right
track but don't quite know the syntacs.

Suggestions?

Thanks.


--
spackler
------------------------------------------------------------------------
spackler's Profile: http://www.excelforum.com/member.php...o&userid=26212
View this thread: http://www.excelforum.com/showthread...hreadid=395191


Vasant Nanavati

=SUM(INDIRECT("A"&ROW()&":D"&ROW()))

--

Vasant



"spackler" wrote in
message ...

I have a software program that kicks out Excel reports with data from
its fields and I need to add the cells up. I can put the =SUM(A1:D1)
formula in a field within the software so it adds up A1 through D1 no
problem but the simple =SUM(A1:D1) then shows up in row 2. So where it
should be =SUM(A2:D2) Excel is taking the literall text in the field so
it is not working beyond row 1. I get =SUM(A1:D1) in all rows.

My thinking is to come up with a formula that uses the ROW() function
to tell the next cell down to use the proper formula so I'm trying
=SUM(A(ROW()):D(ROW())) and it is not working. I think I'm on the right
track but don't quite know the syntacs.

Suggestions?

Thanks.


--
spackler
------------------------------------------------------------------------
spackler's Profile:
http://www.excelforum.com/member.php...o&userid=26212
View this thread: http://www.excelforum.com/showthread...hreadid=395191




spackler


Great. Awesome. Perfect. Thanks Vasant!

Now I'm trying to do the same thing with =I2-P2 and =D2/A2 and having
no luck adapting what you gave me above for the SUM.

For the subtraction I was trying :
=SUM(INDIRECT("I"&ROW()&"-P"&ROW()))

or

=(INDIRECT("I"&ROW()&"-P"&ROW())) with no luck.

I have not tried the division yet as I realize my function
understanding is lacking...

Suggestions?

Thanks.


--
spackler
------------------------------------------------------------------------
spackler's Profile: http://www.excelforum.com/member.php...o&userid=26212
View this thread: http://www.excelforum.com/showthread...hreadid=395191


Vasant Nanavati

INDIRECT is not really intuitive (at least not to me). It usually takes me a
bit of trial=and-error.

Try:

=INDIRECT("I"&ROW())-INDIRECT("P"&ROW())

and:

=INDIRECT("D"&ROW())/INDIRECT("A"&ROW())

--

Vasant





"spackler" wrote in
message ...

Great. Awesome. Perfect. Thanks Vasant!

Now I'm trying to do the same thing with =I2-P2 and =D2/A2 and having
no luck adapting what you gave me above for the SUM.

For the subtraction I was trying :
=SUM(INDIRECT("I"&ROW()&"-P"&ROW()))

or

=(INDIRECT("I"&ROW()&"-P"&ROW())) with no luck.

I have not tried the division yet as I realize my function
understanding is lacking...

Suggestions?

Thanks.


--
spackler
------------------------------------------------------------------------
spackler's Profile:
http://www.excelforum.com/member.php...o&userid=26212
View this thread: http://www.excelforum.com/showthread...hreadid=395191




spackler


Those look to be working, thanks again!


--
spackler
------------------------------------------------------------------------
spackler's Profile: http://www.excelforum.com/member.php...o&userid=26212
View this thread: http://www.excelforum.com/showthread...hreadid=395191



All times are GMT +1. The time now is 08:33 PM.

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