Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default if formula with variables

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

  #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

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

Sorry, this requires something extra:

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

"~L" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default if formula with variables

Thanks for your help. I did get the Vlookup to work without the false. Can
you tell me what that is for?


"~L" wrote:

Sorry, this requires something extra:

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

"~L" wrote:

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

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

The last argument of VLOOKUP is TRUE or FALSE. FALSE means exact match, TRUE
means closest match. If omitted, TRUE is the default value.

Glad I could help!

"Ronda" wrote:

Thanks for your help. I did get the Vlookup to work without the false. Can
you tell me what that is for?


"~L" wrote:

Sorry, this requires something extra:

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

"~L" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variables in URL formula help teepee[_2_] Excel Discussion (Misc queries) 4 May 9th 07 04:20 PM
IF formula for 13 plus variables N Dependable Excel Worksheet Functions 3 April 27th 06 10:21 PM
How to plot a formula with two variables Ali Baba Charts and Charting in Excel 2 September 29th 05 06:13 PM
cell variables in IF formula Micayla Bergen Excel Discussion (Misc queries) 5 June 6th 05 08:09 AM
<> Scooterdog Excel Worksheet Functions 3 November 12th 04 05:19 PM


All times are GMT +1. The time now is 10:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"