Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Comparing 3 numbers
This should do it.
=INDEX($1:$1,MATCH(MIN(A2:C2),2:2,0)) a b c d 2 1 4 b 2 4 5 a 5 3 2 c -- Don Guillett Microsoft MVP Excel SalesAid Software 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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Comparing two columns of numbers | Excel Worksheet Functions | |||
comparing numbers in a sheet | Excel Discussion (Misc queries) | |||
Comparing numbers/figures | Excel Worksheet Functions | |||
Comparing numbers, ignoring sign | Excel Discussion (Misc queries) | |||
Comparing 3 numbers and displaying the lesser of the three | Excel Worksheet Functions |