View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default asign a number to a text string

One play to deliver it ..

Assume the col headers:
Fruits, Vegetables, Meat, Fish, Fresh
are in B1:F1, and the DVs are in B2:F2 down

a. Set up this reference table in I2:J4

Yes 1
No 0
Sometimes 0.5
Maybe 0.25

b. Then place in G2:
=IF(COUNTA(B2:F2)<5,"",SUMPRODUCT(N(OFFSET($J$1,MA TCH(B2:F2,$I$2:$I$5,0),))))
Copy G2 down as far as required

As per your post, if B2:F2 contains the 5 DV selections:
Yes Yes Sometimes No Maybe

then G2 will return the required: 2.75
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:363 Subscribers:64
xdemechanik
---
"gimme_donuts" wrote:
it has to be very easy but I have not found the way to do it.

What I'm tryig to do is some list of companies and for their services I want
to use Yes for 1, No for 0, Sometimes for 0.5 and Maybe for 0.25.

just asigning these numbers to the text is what I want, so that it is easely
readable and editable for everyone and it still can make some addition of it
in the end.

Example:

Kwik e-mart Fruits - Vegetables - Meat - Fish - Fresh Total
score


2.75


To add this data, I used the validation function so that there is a dropdown
menu for each criteria (Yes, No, Sometimes, Maybe)