Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Multiple IF statements looking up multiple ranges.

Hi all,

I would like to be able to have a master table set up like the example below:

PRODUCT PRICE
M01 0.10
M02 0.10
M03 0.10
M07 0.20
M08 0.20
M09 0.20
M10 0.30
M11 0.30
M22 0.40
M23 0.40

This master table would then be used to update another table of customers
prices which looks like this:

CUSTOMER CODE STOCK CODE DESCRIPTION PRICE
TMANDA M01 MILK 1 PINT WHOLE
1.10

I have used an if statement which works for the Pints using cell references
and look slike this

=IF(B4=$M$4,D4+$N$4,IF(B4=$M$5,D4+$N$5,IF(B4=$M$6, D4+$N$6)))


but as i understand it you can only have 7 if statements and i have more
that 7 products. So i would like to be able to use and if statement to look
up a range of values ie all the pint codes M01, M02, M03 and just increase
the price accordingly by 10p.

Or another option would be to use an if statement that looked up the text
string ie the word "PINT" instead of the code but im not sure how to do this
:-(

Many thanks in advance for any help.

Regards

Mike

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Multiple IF statements looking up multiple ranges.

You seem to be adding D4 onto the price - you can get the price with
VLOOKUP, so try this formula instead of your multiple IF:

=D4+VLOOKUP(B4,$M$4:$N$100,2,0)

Here I have assumed that you have items up to row 100, but you can
adjust this to suit.

Hope this helps.

Pete

On Aug 9, 3:08 pm, mike wrote:
Hi all,

I would like to be able to have a master table set up like the example below:

PRODUCT PRICE
M01 0.10
M02 0.10
M03 0.10
M07 0.20
M08 0.20
M09 0.20
M10 0.30
M11 0.30
M22 0.40
M23 0.40

This master table would then be used to update another table of customers
prices which looks like this:

CUSTOMER CODE STOCK CODE DESCRIPTION PRICE
TMANDA M01 MILK 1 PINT WHOLE
1.10

I have used an if statement which works for the Pints using cell references
and look slike this

=IF(B4=$M$4,D4+$N$4,IF(B4=$M$5,D4+$N$5,IF(B4=$M$6, D4+$N$6)))

but as i understand it you can only have 7 if statements and i have more
that 7 products. So i would like to be able to use and if statement to look
up a range of values ie all the pint codes M01, M02, M03 and just increase
the price accordingly by 10p.

Or another option would be to use an if statement that looked up the text
string ie the word "PINT" instead of the code but im not sure how to do this
:-(

Many thanks in advance for any help.

Regards

Mike



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 772
Default Multiple IF statements looking up multiple ranges.

what the heck is 10p? Must have meant cents ;) You want a vlookup not all
that if mess. Look into help for that but basically it will be something like
=vlookup("stockcode on customer page", "productcode and price columns like
A2:B1000",2 "the 2 is because you want to look up the code in column one and
return what is in column 2 the price",false "just because")

hope that makes sense, vlookups are hard to get your head around in the
beginning.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"mike" wrote:

Hi all,

I would like to be able to have a master table set up like the example below:

PRODUCT PRICE
M01 0.10
M02 0.10
M03 0.10
M07 0.20
M08 0.20
M09 0.20
M10 0.30
M11 0.30
M22 0.40
M23 0.40

This master table would then be used to update another table of customers
prices which looks like this:

CUSTOMER CODE STOCK CODE DESCRIPTION PRICE
TMANDA M01 MILK 1 PINT WHOLE
1.10

I have used an if statement which works for the Pints using cell references
and look slike this

=IF(B4=$M$4,D4+$N$4,IF(B4=$M$5,D4+$N$5,IF(B4=$M$6, D4+$N$6)))


but as i understand it you can only have 7 if statements and i have more
that 7 products. So i would like to be able to use and if statement to look
up a range of values ie all the pint codes M01, M02, M03 and just increase
the price accordingly by 10p.

Or another option would be to use an if statement that looked up the text
string ie the word "PINT" instead of the code but im not sure how to do this
:-(

Many thanks in advance for any help.

Regards

Mike

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Multiple IF statements looking up multiple ranges.

First, see Debra Dalgleish's coverage of the VLOOKUP function at her website:
http://www.contextures.com/xlFunctions02.html

Then see how she uses it in her Order Form example:
http://www.contextures.com/xlOrderForm01.html

Is that something you can work with?
(Post back if you have more questions)
***********
Regards,
Ron

XL2003, WinXP


"mike" wrote:

Hi all,

I would like to be able to have a master table set up like the example below:

PRODUCT PRICE
M01 0.10
M02 0.10
M03 0.10
M07 0.20
M08 0.20
M09 0.20
M10 0.30
M11 0.30
M22 0.40
M23 0.40

This master table would then be used to update another table of customers
prices which looks like this:

CUSTOMER CODE STOCK CODE DESCRIPTION PRICE
TMANDA M01 MILK 1 PINT WHOLE
1.10

I have used an if statement which works for the Pints using cell references
and look slike this

=IF(B4=$M$4,D4+$N$4,IF(B4=$M$5,D4+$N$5,IF(B4=$M$6, D4+$N$6)))


but as i understand it you can only have 7 if statements and i have more
that 7 products. So i would like to be able to use and if statement to look
up a range of values ie all the pint codes M01, M02, M03 and just increase
the price accordingly by 10p.

Or another option would be to use an if statement that looked up the text
string ie the word "PINT" instead of the code but im not sure how to do this
:-(

Many thanks in advance for any help.

Regards

Mike

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Multiple IF statements looking up multiple ranges.

Hi Pete many thanks for your help seems so simple now :-)

"Pete_UK" wrote:

You seem to be adding D4 onto the price - you can get the price with
VLOOKUP, so try this formula instead of your multiple IF:

=D4+VLOOKUP(B4,$M$4:$N$100,2,0)

Here I have assumed that you have items up to row 100, but you can
adjust this to suit.

Hope this helps.

Pete

On Aug 9, 3:08 pm, mike wrote:
Hi all,

I would like to be able to have a master table set up like the example below:

PRODUCT PRICE
M01 0.10
M02 0.10
M03 0.10
M07 0.20
M08 0.20
M09 0.20
M10 0.30
M11 0.30
M22 0.40
M23 0.40

This master table would then be used to update another table of customers
prices which looks like this:

CUSTOMER CODE STOCK CODE DESCRIPTION PRICE
TMANDA M01 MILK 1 PINT WHOLE
1.10

I have used an if statement which works for the Pints using cell references
and look slike this

=IF(B4=$M$4,D4+$N$4,IF(B4=$M$5,D4+$N$5,IF(B4=$M$6, D4+$N$6)))

but as i understand it you can only have 7 if statements and i have more
that 7 products. So i would like to be able to use and if statement to look
up a range of values ie all the pint codes M01, M02, M03 and just increase
the price accordingly by 10p.

Or another option would be to use an if statement that looked up the text
string ie the word "PINT" instead of the code but im not sure how to do this
:-(

Many thanks in advance for any help.

Regards

Mike






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Multiple IF statements looking up multiple ranges.

Hi Ron many thanks for this

"Ron Coderre" wrote:

First, see Debra Dalgleish's coverage of the VLOOKUP function at her website:
http://www.contextures.com/xlFunctions02.html

Then see how she uses it in her Order Form example:
http://www.contextures.com/xlOrderForm01.html

Is that something you can work with?
(Post back if you have more questions)
***********
Regards,
Ron

XL2003, WinXP


"mike" wrote:

Hi all,

I would like to be able to have a master table set up like the example below:

PRODUCT PRICE
M01 0.10
M02 0.10
M03 0.10
M07 0.20
M08 0.20
M09 0.20
M10 0.30
M11 0.30
M22 0.40
M23 0.40

This master table would then be used to update another table of customers
prices which looks like this:

CUSTOMER CODE STOCK CODE DESCRIPTION PRICE
TMANDA M01 MILK 1 PINT WHOLE
1.10

I have used an if statement which works for the Pints using cell references
and look slike this

=IF(B4=$M$4,D4+$N$4,IF(B4=$M$5,D4+$N$5,IF(B4=$M$6, D4+$N$6)))


but as i understand it you can only have 7 if statements and i have more
that 7 products. So i would like to be able to use and if statement to look
up a range of values ie all the pint codes M01, M02, M03 and just increase
the price accordingly by 10p.

Or another option would be to use an if statement that looked up the text
string ie the word "PINT" instead of the code but im not sure how to do this
:-(

Many thanks in advance for any help.

Regards

Mike

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Multiple IF statements looking up multiple ranges.

Hi John,

thanks very much you have saved me a major headache :-)



"John Bundy" wrote:

what the heck is 10p? Must have meant cents ;) You want a vlookup not all
that if mess. Look into help for that but basically it will be something like
=vlookup("stockcode on customer page", "productcode and price columns like
A2:B1000",2 "the 2 is because you want to look up the code in column one and
return what is in column 2 the price",false "just because")

hope that makes sense, vlookups are hard to get your head around in the
beginning.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"mike" wrote:

Hi all,

I would like to be able to have a master table set up like the example below:

PRODUCT PRICE
M01 0.10
M02 0.10
M03 0.10
M07 0.20
M08 0.20
M09 0.20
M10 0.30
M11 0.30
M22 0.40
M23 0.40

This master table would then be used to update another table of customers
prices which looks like this:

CUSTOMER CODE STOCK CODE DESCRIPTION PRICE
TMANDA M01 MILK 1 PINT WHOLE
1.10

I have used an if statement which works for the Pints using cell references
and look slike this

=IF(B4=$M$4,D4+$N$4,IF(B4=$M$5,D4+$N$5,IF(B4=$M$6, D4+$N$6)))


but as i understand it you can only have 7 if statements and i have more
that 7 products. So i would like to be able to use and if statement to look
up a range of values ie all the pint codes M01, M02, M03 and just increase
the price accordingly by 10p.

Or another option would be to use an if statement that looked up the text
string ie the word "PINT" instead of the code but im not sure how to do this
:-(

Many thanks in advance for any help.

Regards

Mike

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Multiple IF statements looking up multiple ranges.

Thanks for the feedback, Mike - glad to be of help.

Pete

On Aug 9, 3:42 pm, mike wrote:
Hi Pete many thanks for your help seems so simple now :-)



"Pete_UK" wrote:
You seem to be adding D4 onto the price - you can get the price with
VLOOKUP, so try this formula instead of your multiple IF:


=D4+VLOOKUP(B4,$M$4:$N$100,2,0)


Here I have assumed that you have items up to row 100, but you can
adjust this to suit.


Hope this helps.


Pete


On Aug 9, 3:08 pm, mike wrote:
Hi all,


I would like to be able to have a master table set up like the example below:


PRODUCT PRICE
M01 0.10
M02 0.10
M03 0.10
M07 0.20
M08 0.20
M09 0.20
M10 0.30
M11 0.30
M22 0.40
M23 0.40


This master table would then be used to update another table of customers
prices which looks like this:


CUSTOMER CODE STOCK CODE DESCRIPTION PRICE
TMANDA M01 MILK 1 PINT WHOLE
1.10


I have used an if statement which works for the Pints using cell references
and look slike this


=IF(B4=$M$4,D4+$N$4,IF(B4=$M$5,D4+$N$5,IF(B4=$M$6, D4+$N$6)))


but as i understand it you can only have 7 if statements and i have more
that 7 products. So i would like to be able to use and if statement to look
up a range of values ie all the pint codes M01, M02, M03 and just increase
the price accordingly by 10p.


Or another option would be to use an if statement that looked up the text
string ie the word "PINT" instead of the code but im not sure how to do this
:-(


Many thanks in advance for any help.


Regards


Mike- Hide quoted text -


- Show quoted text -



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
multiple IF statements Tom Excel Worksheet Functions 14 July 27th 07 08:03 PM
Multiple if statements I think DP7 Excel Worksheet Functions 2 January 30th 07 05:16 PM
Multiple if statements with multiple conditions egarcia Excel Discussion (Misc queries) 4 January 29th 07 10:46 PM
Can I create Multiple passwords to edit multiple ranges? Conker10382 Excel Discussion (Misc queries) 8 December 31st 06 07:58 PM
How do i update multiple data ranges across multiple worksheets? mwah Excel Discussion (Misc queries) 0 July 6th 06 04:57 AM


All times are GMT +1. The time now is 11:32 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"