View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
JLatham JLatham is offline
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.