Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF then ????

Status
Not open for further replies.

authorsami

Instructor
Sep 11, 2003
155
US
I have a spreadsheet that looks like the following:

Shipments 1 2 1
prod1 125 50 52
prod2 85 25 10

can I put a formula in to tell me if the shipment is #1 then to add the 125 and the 52. Keep in mind I will have many rows of 1,2,3,etc......I know this is a if then, but not sure exactly how to do this.

If you need to see the actual spreadsheet please let me know I can email to your directly.

Sharon
 
Hi Sharon,

For your example, with data is in B1:D3, use ..

Code:
=SUMIF(B1:D1,1,B2:D2)

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Oh my Gosh!!!!! That was so simple why oh why didn't I think of it... I was so close.

Thank you so much,Tony. This is just what I needed,

Sharon

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top