#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Comparing 3 numbers

I'm comparing prices at Baker's, Walmart, and Costco. I've got the
item, unit cost, size, and cost per ounce. I know how to make
comparisons between two numbers using a statement such as:

=IF(D3I3,"Bakers","Walmart")

but how do I add Costco to the equation?

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default Comparing 3 numbers


--
regards from Brazil
Thanks in advance for your feedback.
Marcelo

you should use if(and or if(or

hth

" escreveu:

I'm comparing prices at Baker's, Walmart, and Costco. I've got the
item, unit cost, size, and cost per ounce. I know how to make
comparisons between two numbers using a statement such as:

=IF(D3I3,"Bakers","Walmart")

but how do I add Costco to the equation?

Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Comparing 3 numbers

Looking in the help index search box for MIN or MAX should help.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

wrote in message
...
I'm comparing prices at Baker's, Walmart, and Costco. I've got the
item, unit cost, size, and cost per ounce. I know how to make
comparisons between two numbers using a statement such as:

=IF(D3I3,"Bakers","Walmart")

but how do I add Costco to the equation?

Thank you.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Comparing 3 numbers

Try a variation of this:
=IF(AND(A2<B2,A2<C2),"Bakers",IF(AND(B2<A2,B2<C2), "Costco","Walmart"))

change references to A2 to the column with Bakers costs in it,
change references to B2 to column with Costco prices, and
change references to C2 to column with Walmart prices.

I believe that'll do the trick for you. Now if all prices are equal - you
will get sent to Walmart - so you might want to rearrange things so that the
closest outlet ends up being the "default when all prices are equal" :-).


" wrote:

I'm comparing prices at Baker's, Walmart, and Costco. I've got the
item, unit cost, size, and cost per ounce. I know how to make
comparisons between two numbers using a statement such as:

=IF(D3I3,"Bakers","Walmart")

but how do I add Costco to the equation?

Thank you.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Comparing 3 numbers

On May 18, 10:33*am, "Don Guillett" wrote:
Looking in the help index search box for MIN or MAX should help.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
wrote in message

...

I'm comparing prices at Baker's, Walmart, and Costco. I've got the
item, unit cost, size, and cost per ounce. I know how to make
comparisons between two numbers using a statement such as:


=IF(D3I3,"Bakers","Walmart")


but how do I add Costco to the equation?


Thank you.


This only returns a number, correct? In other words, =MIN(D3,I3,N3)
will only give a number, not a store name. I'd like to be able to see
the name of the store with the lowest prices.


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Comparing 3 numbers

Actually, the previous formula doesn't always return the proper value (I hate
it when that happens!). But this one would do it for certain - assumes the
missing item is in column O (D = walmart prices, I = baker's and O =
costco's) You can change them around as desired. In the case of 2, or 3,
prices being the same, it will return the first one it encounters.

=IF(MIN(D2,I2,O2)=D2,"Walmart",IF(MIN(D2,I2,O2)=I2 ,"Bakers","Costco"))

" wrote:

I'm comparing prices at Baker's, Walmart, and Costco. I've got the
item, unit cost, size, and cost per ounce. I know how to make
comparisons between two numbers using a statement such as:

=IF(D3I3,"Bakers","Walmart")

but how do I add Costco to the equation?

Thank you.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Comparing 3 numbers

Hi

Supposing your store names are in A1:C1 and the values you are comparing are
in A2:C2

=INDEX($A$1:$C$1,MATCH(MIN($A2:$C2),$A2:$C2,0))

--
Regards
Roger Govier

wrote in message
...
On May 18, 10:33 am, "Don Guillett" wrote:
Looking in the help index search box for MIN or MAX should help.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
wrote in message

...

I'm comparing prices at Baker's, Walmart, and Costco. I've got the
item, unit cost, size, and cost per ounce. I know how to make
comparisons between two numbers using a statement such as:


=IF(D3I3,"Bakers","Walmart")


but how do I add Costco to the equation?


Thank you.


This only returns a number, correct? In other words, =MIN(D3,I3,N3)
will only give a number, not a store name. I'd like to be able to see
the name of the store with the lowest prices.


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Comparing 3 numbers

If you are looking for the maximum, use
=IF(MAX(D3,I3,X3)=D3,"Bakers",IF(MAX(D3,I3,X3)=I3, "Walmart","Costco"))
If you are looking for the minimum, adjust the formula as necessary.
--
David Biddulph

wrote in message
...
I'm comparing prices at Baker's, Walmart, and Costco. I've got the
item, unit cost, size, and cost per ounce. I know how to make
comparisons between two numbers using a statement such as:

=IF(D3I3,"Bakers","Walmart")

but how do I add Costco to the equation?

Thank you.



  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Comparing 3 numbers

On May 18, 10:49*am, JLatham
wrote:
Try a variation of this:
=IF(AND(A2<B2,A2<C2),"Bakers",IF(AND(B2<A2,B2<C2), "Costco","Walmart"))

change references to A2 to the column with Bakers costs in it,
change references to B2 to column with Costco prices, and
change references to C2 to column with Walmart prices.

I believe that'll do the trick for you. *Now if all prices are equal - you
will get sent to Walmart - so you might want to rearrange things so that the
closest outlet ends up being the "default when all prices are equal" :-).

" wrote:
I'm comparing prices at Baker's, Walmart, and Costco. I've got the
item, unit cost, size, and cost per ounce. I know how to make
comparisons between two numbers using a statement such as:


=IF(D3I3,"Bakers","Walmart")


but how do I add Costco to the equation?


Thank you.


Can you help me read this in English?

=IF(AND(D3<I3,D3<N3),"Walmart",IF(AND
(I3<D3,I3<N3),"Costco","Walmart"))

If D3 is less than I3, and D3 is less than N3, then the answer is
Walmart, but if I3 is less than D3, and I3 is less than N3, then
Costco. But if neither of those two true, then the answer is Walmart.
Is that correct?



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Comparing 3 numbers

You translated it properly - and it works well with 3 unique values, but when
you have 2 that are the same, it can fail. See my other post (and also the
post by David Biddulph) for a method that works correctly in all cases.


" wrote:

On May 18, 10:49 am, JLatham
wrote:
Try a variation of this:
=IF(AND(A2<B2,A2<C2),"Bakers",IF(AND(B2<A2,B2<C2), "Costco","Walmart"))

change references to A2 to the column with Bakers costs in it,
change references to B2 to column with Costco prices, and
change references to C2 to column with Walmart prices.

I believe that'll do the trick for you. Now if all prices are equal - you
will get sent to Walmart - so you might want to rearrange things so that the
closest outlet ends up being the "default when all prices are equal" :-).

" wrote:
I'm comparing prices at Baker's, Walmart, and Costco. I've got the
item, unit cost, size, and cost per ounce. I know how to make
comparisons between two numbers using a statement such as:


=IF(D3I3,"Bakers","Walmart")


but how do I add Costco to the equation?


Thank you.


Can you help me read this in English?

=IF(AND(D3<I3,D3<N3),"Walmart",IF(AND
(I3<D3,I3<N3),"Costco","Walmart"))

If D3 is less than I3, and D3 is less than N3, then the answer is
Walmart, but if I3 is less than D3, and I3 is less than N3, then
Costco. But if neither of those two true, then the answer is Walmart.
Is that correct?


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
Comparing two columns of numbers PaladinWhite Excel Worksheet Functions 2 June 1st 08 11:46 PM
comparing numbers in a sheet Rockbear Excel Discussion (Misc queries) 1 April 15th 08 06:16 PM
Comparing numbers/figures Lona M. Excel Worksheet Functions 1 December 19th 07 02:24 PM
Comparing numbers, ignoring sign steev_jd Excel Discussion (Misc queries) 3 April 18th 06 10:44 AM
Comparing 3 numbers and displaying the lesser of the three tbible Excel Worksheet Functions 2 November 18th 04 05:41 PM


All times are GMT +1. The time now is 02:40 AM.

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"