Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to have a a cell that has the value 1,2,3 ... or 10 but it will show some text - but when I use the cell value in formulas it should use the numbers!

For example:

  • Cell A1 displays a word Apple but has a value of 1.
  • Cell B1 displays a word Orange but has a value of 2.
  • Cell C1 will have a formula =A1+B1, but would display a value of 3.
share|improve this question
1  
Why do you want to do this? –  David Mar 21 '13 at 21:32
    
I want to add a $ value to items but diisplay their Name instead of actual $ value. Later I can make lists such as "Customer basket contains Aplle, Orange" total value = $3. –  user209378 Mar 21 '13 at 21:44

1 Answer 1

up vote 1 down vote accepted

You can do this with custom format:

Select cell A1, go to Format Cells->Number->Category->Customer and enter "Apple"in the Type field.

Repeat the process for all other cells.

However, note that this "information hiding" is not best practice, as this makes your file hard to audit/debug later. Better use a hidden column to store the values - and type the names directly!

share|improve this answer
    
@ Peter Albert - how exactly do I use a hidden column to store the values - and type the names directly? –  user209378 Mar 21 '13 at 21:49
    
Store the numbers 1 to 10 in A1 to A10. Select column A, right click the column header and select "Hide". Type "Apple", ... in B1 to B10. Use A1 to A10 in any formula you need to refer to the "underlying" value. –  Peter Albert Mar 21 '13 at 22:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.