View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Comparing cells and output text

To return the Company names to column F try the VLOOKUP function.

Debra Dalgleish has goo instructions and a downloadable workbook.

http://www.contextures.on.ca/xlFunctions02.html

For changing cells colors based on cell value........text or numeric see
Conditional Formatting

See also Debra's site at http://www.contextures.on.ca/xlCondFormat01.html for
more on CF


Gord Dibben MS Excel MVP

On Sat, 17 May 2008 13:24:00 -0700, Rocketeer
wrote:

Hi!

I'm comparing prices of different companies and products.
If I have prices in different cells for each company I can
calculate the lowest price using:

=MIN(A1;B1;C1;D1)

The output is written in E1. How will I have cell F1 write
the company name? Let's say the companies are IBM,
MS, DELL, HP.

If MS has the lowest price I will have the value of B1 in
cell E1 and in cell F1 I will have the text MS.

It is simple to to with an IF statement when you only have
two companies. But what if you have three or more? Is there
a formula to use for a general case with many companies?

I am also curious if it it possible to change the color of cell
F1 depending on the text there? Let's say blue for MS, red
for Dell etc.

Thanks!