Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hi,
I am having a fairly simple issue but can't figure it out. Please see example. A B food food food food drink drink drink drink fruit fruit fruit fruit In B column I am looking for a formula which I can drag down, that will assign a 5 for food a 10 for drink and 15 for fruit so at the end it will look something like this: A B food 5 food 5 food 5 drink 10 drink 10 drink 10 fruit 15 fruit 15 fruit 15 I pretty much want to tell it that if A is fruit then B should be 5, if A is drink then B should be 10 and if A is fruit then B should be 15. I would like to have all that in the same formula. Now obviously my situation is more complicated than this so other advice than what Im asking for may not work for me. Please help Mike |
#2
![]() |
|||
|
|||
![]()
With one formula you could do it like this;
=CHOOSE(MATCH(A1,{"food","drink","fruit"},0),5,10, 15) If you have a giant list of values to match with texts, it would be easier to create that list and corresponding values in a separate table, then use a VLOOKUP or INDEX/MATCH formula to find the matching value. e.g. =VLOOKUP("food",F1:G20,2,FALSE) with F1:F20 containing labels(words) and G1:G20 containing values. "mike" wrote in message om... Hi, I am having a fairly simple issue but can't figure it out. Please see example. A B food food food food drink drink drink drink fruit fruit fruit fruit In B column I am looking for a formula which I can drag down, that will assign a 5 for food a 10 for drink and 15 for fruit so at the end it will look something like this: A B food 5 food 5 food 5 drink 10 drink 10 drink 10 fruit 15 fruit 15 fruit 15 I pretty much want to tell it that if A is fruit then B should be 5, if A is drink then B should be 10 and if A is fruit then B should be 15. I would like to have all that in the same formula. Now obviously my situation is more complicated than this so other advice than what Im asking for may not work for me. Please help Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
no row numbers or column letters DISPLAYED | Excel Discussion (Misc queries) | |||
How do I convert numbers into words in excell worksheet? | Excel Worksheet Functions | |||
Words > Numbers (i.e. Vanity Phone Numbers) function | Excel Worksheet Functions | |||
How do I split a column having numbers and text in a random order | Excel Worksheet Functions | |||
Average/Min column of numbers, but skip 0's and Null's in the form | Excel Worksheet Functions |