Assign number value to a field with text in it?

  • Thread starter Thread starter sleland
  • Start date Start date
S

sleland

Is this possible to do?

I want a cell to have a number assigned to it, but display text in the
cell, so I can use the cell in a mathmatical formula.

I'm using Excel 2003 to track how many seats I have left in each
conference room. I want the name of a room to equal a number.
For example: I want the text "Executive Room A" to equal 105

Does anyone know a way to do this with out putting them in different
fields.

-Sharon
 
You may want to use Help to learn about VLOOKUP.
You can make a table on say Sheet2 with the room names and seating capacity.
The in Sheet I you can use the name in say A1 to lookup the seating
capacity. Suppose B1 has the expected number of people, In C1 use something
like IF(VLOOKUP(A1,Sheet2!A1:B25,2,FALSE)<B1,"Too few seats","OK")
Bernard
 
sleland > said:
Is this possible to do?

I want a cell to have a number assigned to it, but display text in the
cell, so I can use the cell in a mathmatical formula.

I'm using Excel 2003 to track how many seats I have left in each
conference room. I want the name of a room to equal a number.
For example: I want the text "Executive Room A" to equal 105

Does anyone know a way to do this with out putting them in different
fields.

-Sharon

You cannot do what you describe. A cell can contain text or a value, but not
both. You can write formulas, such as
=IF(A1="Executive Room A",105,0)
But why not just put the number corresponding to A1 in cell B1?
 
sleland,
You could create a VLOOKUP table of your room names and numbers. Then whereever you want to use the number in a culculation you can insert the formula:

VLOOKUP(lookupvalue,table,2,0)

lookupvalue is the reference to the cell with the room name.
table is the reference to your roomname/roomnumber table.
2 means return the value in the second column of the table.
0 is the same as false, which means only return for an exact match.

Good Luck,
Mark Graesser
(e-mail address removed)

----- sleland > wrote: -----

Is this possible to do?

I want a cell to have a number assigned to it, but display text in the
cell, so I can use the cell in a mathmatical formula.

I'm using Excel 2003 to track how many seats I have left in each
conference room. I want the name of a room to equal a number.
For example: I want the text "Executive Room A" to equal 105

Does anyone know a way to do this with out putting them in different
fields.

-Sharon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top