Solved

Excel formula question

Posted on 2013-12-06
9
237 Views
Last Modified: 2013-12-12
Hi all,

quick question.

I have a spreadsheet showing work quoted. I have a column for the cost and a column where the purchase order number is entered.

without going in VBA is it possible to have a cell which totals the cost column only where there is a purchase order number entered in another cell?

i.e.

Description  Cost             PO
Work 1          £10.00         C-102933
Work 2          £20.00        
Work 3          £10.00         C-102383
Work 4          £40.00         C-104452
Work 5          £50.00

Order Received £60.00
Outstanding      £70.00
Total                   £130.00
0
Comment
Question by:flynny
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 14

Accepted Solution

by:
DonConsolio earned 100 total points
Comment Utility
Create a new column containing an "IF()" formula

i.e. insert value 0 if column PO = "" , insert value of column Cost otherwise

and sum up that column.
0
 
LVL 48

Assisted Solution

by:Rgonzo1971
Rgonzo1971 earned 100 total points
Comment Utility
I suggest you use SUMIF for this purpose:

=SUMIF(D2:D6,"<>",C2:C6)

see example

Regards
Sumif1.xlsx
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 100 total points
Comment Utility
You can use SUMIF function.

=SUMIF(PO Column, "<>",Value Column)

Thanks
Rob H
0
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 100 total points
Comment Utility
If your numbers are in B2:B6 then use this formula

=SUMIF($C$2:$C$6,"<>",$B$2:$B$6)
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 19

Assisted Solution

by:regmigrant
regmigrant earned 100 total points
Comment Utility
or use 'Sumif" -

Order received: =SUMIF($D$2:$D$6,"> ",$C$2:$C$6)
Outstanding: =SUMIF($D$2:$D$6,"",$C$2:$C$6)

example attached
Book2.xlsx
0
 
LVL 31

Expert Comment

by:Rob Henson
Comment Utility
Does 4 people with effectively the same answer make it the right thing to do?

I wonder if BarryHoudini is going to chirp in with a SUMPRODUCT option or somebody else with a Pivot Table??

Happy Friday to one and all!

Thanks
Rob H
0
 
LVL 19

Expert Comment

by:regmigrant
Comment Utility
its the Christmas season - get back to work all of you

reg
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
Comment Utility
We all have nothing else to do. 4 same answers within less than 4 minutes.
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
SUMIF, SUMPRODUCT, are you mad!?

You can use SUMIFS

=SUMIFS(B2:B6,C2:C6,"<>")

or an "array formula"

=SUM(IF(C2:C6<>"",B2:B6))

confirmed with CTRL+SHIFT+ENTER

regards, barry

[definitely not for points]
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now