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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF formula

Status
Not open for further replies.

Blyss

Technical User
Jul 5, 2004
15
US
Hi all,
I have the following data:

Code Quantity Total Cost
E35 100
A89 300
E35 150
etc...

I need a formula that works out the total cost depending on the formula.
So far i've got this code:

=IF(E5="e35","A",IF(E5="a89","E",""))


if anyone could help me find out what i need to add to it i would be most grateful. Thanks,

Blyss
 
Just realised I typed something wrong,
What i mean was:

I need a formula that works out the total cost depending on the code of the item.

and so far i've got this formula:

=IF(E5="e35","A",IF(E5="a89","E",""))

Sorry and thanks again
 
Hi Blyss,

Is Total Cost equal to Quantity * Unit Price where Unit Price varies according to Code. If so I would put a lookup table somewhere out of the way and call it, say, UnitPrices, with contents like this ..

[tt]E35 5.00
A89 4.50[/tt]

Then if you have ..

Cell A2: E35
Cell B2: 100

.. put this formula in cell C2 ..

[blue][tt] =VLOOKUP(A2,UnitPrices,2,FALSE)*B2[/tt][/blue]

Sorry if I've misunderstood what you want.


Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top