View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
~L ~L is offline
external usenet poster
 
Posts: 177
Default if formula with variables

I read this as:
You have a list of option numbers with names. 1 = Caramel, 2 = maple, etc.
These options have corresponding prices.

This information is arranged whe Column H is option number, column I is
option name, column J is option price.

And you want to look up an option number from column D, then return an
option price.

If that is the case, you can use VLOOKUP to return the price.

Assuming the lookup data begins in row 3 and the option/name/price list ends
at row 7:

In E2 enter:

=VLOOKUP(D2,$H$3:$J$7,3)


"Ronda" wrote:

I have a spreadsheet that I need to take the base cost of an item and add an
option if it applies to that item.
Example
Apples = 2.00
Apples with caramel = 2.50
Apples with maple = 2.50
Apples with Peanut butter = 3.00
Apples with Jelly = $3.00
I have my if number in column D, I have my variable (caramel, maple, etc
listed in column I with the correspondening number in column H. my pricing
for the option is in column J. This is kind of what I need

=if(d2=h3:h7),j3