Assign Values to String Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am trying to assign a numeric value to cells with string/text variables.
For instance, 10-2 would signify 4 hours... so the value I would like to
calculate would be 4. Is there an easy way to do this?


Thanks
 
PC-Renew said:
I am trying to assign a numeric value to cells with string/text variables.
For instance, 10-2 would signify 4 hours... so the value I would like to
calculate would be 4. Is there an easy way to do this?

VLOOKUP would be, imo, the easiest.
Eg: Assume textstring in A1: 11-7
Then in B1: =VLOOKUP(A1,{"10-2",4;"10-5",7;"11-7",8},2,0)
will return 8

---
 

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