View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rocketeer Rocketeer is offline
external usenet poster
 
Posts: 14
Default Comparing cells and output text

Hi Max!

I can see were you want to go with the formulas. I'm having trouble
with the MATCH function. Lets say I don't have data in A1:D1 but
rather in F2, J2, N2 and R2.

=MATCH(MIN(F2;J2;N2;R2);(F2;J2;N2;R2);0)

But this outputs a #N/A in the target cell V2. Do you have any
suggestions?

Thanks!


"Max" wrote:

Q1:
This might suffice
In E1: =INDEX({"IBM","MS","DELL","HP"},MATCH(MIN(A1:D1),A 1:D1,0))

Q2:
You could use CF for col F, but only up to 3 colours (in xl2003)
Steps would go something like this ..
Select col F (F1 active), click Format Conditional Formatting
Condition 1
Formula Is: =$E1="MS"
Format to taste

Condition 2
Formula Is: =$E1="DELL"
Format to taste

Condition 3
Formula Is: =$E1="IBM"
Format to taste
OK out
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Rocketeer" wrote:
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!