ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If Then Calculate (https://www.excelbanter.com/excel-discussion-misc-queries/104841-if-then-calculate.html)

Gladys

If Then Calculate
 
How would I write a formula that states if account number = 94411 add current
cost amount from Column "a" into a total instead of me manually selecting
which cells to add.

(A) (B) (C)
Current Projected Account
Cost Cost Number

$2,180.00 $2,180.00 94411
$10,414.98 $10,414.98 94411
$1,955.20 $2,045.00 94621
$918.23 $1,038.00 93703
$275.00 $275.00 94411
$200.00 $210.00 94411
$1,635.00 $1,635.00 93703
$135.00 $0.00 94411
$1,440.00 $1,440.00 94411

Thanks for all your help.


carstowal

If Then Calculate
 

Assuming $2180.00 is in cell A1

to calculate the total of account #94411 use:
=SUMIF(C1:C9,94411,B1:B9)

You can automate the formula for every account by replacing the text
94411 with the cell that contains that account number.


--
carstowal
------------------------------------------------------------------------
carstowal's Profile: http://www.excelforum.com/member.php...o&userid=37476
View this thread: http://www.excelforum.com/showthread...hreadid=571413


Franz Verga

If Then Calculate
 
Gladys wrote:
How would I write a formula that states if account number = 94411 add
current cost amount from Column "a" into a total instead of me
manually selecting which cells to add.

(A) (B) (C)
Current Projected Account
Cost Cost Number

$2,180.00 $2,180.00 94411
$10,414.98 $10,414.98 94411
$1,955.20 $2,045.00 94621
$918.23 $1,038.00 93703
$275.00 $275.00 94411
$200.00 $210.00 94411
$1,635.00 $1,635.00 93703
$135.00 $0.00 94411
$1,440.00 $1,440.00 94411

Thanks for all your help.



I think you can use SUMIF function. Check the online help.


--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy



Gladys

If Then Calculate
 
Forget the question - I had a brain fart - SUMIF - :)

"Gladys" wrote:

How would I write a formula that states if account number = 94411 add current
cost amount from Column "a" into a total instead of me manually selecting
which cells to add.

(A) (B) (C)
Current Projected Account
Cost Cost Number

$2,180.00 $2,180.00 94411
$10,414.98 $10,414.98 94411
$1,955.20 $2,045.00 94621
$918.23 $1,038.00 93703
$275.00 $275.00 94411
$200.00 $210.00 94411
$1,635.00 $1,635.00 93703
$135.00 $0.00 94411
$1,440.00 $1,440.00 94411

Thanks for all your help.


SIR Knight

If Then Calculate
 
Gladys,

There is a formula called SUMIF you can use it as follows:

=SUMIF($C3:$C100,"94411",$A3:$A100)

I have assumed that your first row of data is in row 3

This works by telling excel the area where your reference is, your
reference, and the area to total where there are matches

HTH

Steve



All times are GMT +1. The time now is 03:18 PM.

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