Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bob
 
Posts: n/a
Default Assign values to text within a cell

I would like to know which single function I should use to assign a number
value to a chosen set of words within a cell and place the value in another
cell ie:

if worksheet1,c4 is equal to "High" then worksheet2,d17 will be 3, or
if worksheet1,c4 is equal to "Medium" then worksheet2,d17 will be 2, or
if worksheet1,c4 is equal to "Low" then worksheet2,d17 will be 1
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

on cell d17 in sheet2 type this formula
=vlookup(sheet1!c4,{"high",3;"medium",2;"low",1},2 ,0)

It will give N/a if the values are any other than high,medium or low


"Bob" wrote in message
...
I would like to know which single function I should use to assign a number
value to a chosen set of words within a cell and place the value in
another
cell ie:

if worksheet1,c4 is equal to "High" then worksheet2,d17 will be 3, or
if worksheet1,c4 is equal to "Medium" then worksheet2,d17 will be 2, or
if worksheet1,c4 is equal to "Low" then worksheet2,d17 will be 1



  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

If worksheet1 will always have one of the three values:

D17: =MATCH(Worksheet1!C4,{"Low","Medium","High"},0)

If not:

=IF(ISNA(MATCH(Worksheet1!C4,{"Low","Medium","High "},0)),"",
MATCH(Worksheet1!C4,{"Low","Medium","High"},0))


In article ,
Bob wrote:

I would like to know which single function I should use to assign a number
value to a chosen set of words within a cell and place the value in another
cell ie:

if worksheet1,c4 is equal to "High" then worksheet2,d17 will be 3, or
if worksheet1,c4 is equal to "Medium" then worksheet2,d17 will be 2, or
if worksheet1,c4 is equal to "Low" then worksheet2,d17 will be 1

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to reference a text cell that changes weekly in Header or Foo. duane Excel Discussion (Misc queries) 2 March 20th 05 02:31 PM
On click, copy text into another cell - XL2K Bob the Builder Excel Worksheet Functions 2 March 16th 05 10:03 PM
Text is not showing up in cell. Why not? TomBrooklyn Excel Discussion (Misc queries) 3 March 12th 05 02:08 PM
Text in cell as Formula SU Excel Discussion (Misc queries) 4 March 9th 05 06:37 PM
Help inserting a Cell Value in a Text Cell Dave Excel Worksheet Functions 5 March 5th 05 09:06 PM


All times are GMT +1. The time now is 09:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"