Computing.Net > Forums > Office Software > assign number value to text Excel

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

assign number value to text Excel

Reply to Message Icon

Name: Hellsbells
Date: January 11, 2004 at 09:33:47 Pacific
OS: Win95
CPU/Ram: 233
Comment:

i need to give letters a value for a shift rota, eg i need "N" to equal 11 and "LD" to equal 12. Each cell will have N or LD for different shifts, then i need to add up all in a row to give a total of hours worked. I can't find a formula that lets me give text a value like this! Would appreciate help!-



Sponsored Link
Ads by Google

Response Number 1
Name: dtech10
Date: January 11, 2004 at 15:02:22 Pacific
Reply:

Hi
Excel has a function that's might help it's called CODE which returns the ascii value of the first letter character it finds.
ie. code("A")=65 code("a")=97
you could do something like this.
say A1=N and A2=LD then the formula
=code(a1)-67+code(a2)-64
=11+12



0

Response Number 2
Name: J A Dean
Date: January 11, 2004 at 15:49:40 Pacific
Reply:

I had a quick look at your problem and the easiest solution I could come up with was to use the COUNTIF function twice on each row, once to count the number of Ns and once to count the number of LDs. It is then simply a matter of multiplying the results of the countif by the values you assign to N and LD and adding them together.

Hope this helps.



0

Response Number 3
Name: Hellsbells
Date: January 12, 2004 at 01:12:39 Pacific
Reply:

Thank you thank you thank you!! Have used response 2 (as haven't worked with ascii before) and it works perfectly. No longer have to add up 350 different cells on my calculator and should get correct hours worked first time!Thanks for input.


0

Response Number 4
Name: J A Dean
Date: January 12, 2004 at 02:57:53 Pacific
Reply:

Glad to have been of help.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: assign number value to text Excel

Assign text value (%), Chart output www.computing.net/answers/office/assign-text-value-chart-output/9061.html

Assign Specific #s to Value Range www.computing.net/answers/office/assign-specific-s-to-value-range/8515.html

Convert numbers to text www.computing.net/answers/office/convert-numbers-to-text/7247.html