Formula with first letter in cell

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

Guest

Hello
example : cell a1 reads " 1B- Failure to follow customer instructions"
( 1B is the error code and the rest is the desciption of the error)

now in column F1 I want to give this error a value. every error that
starts with a 1 has a value of 5, if the error starts with a 2 is has a
value of 10 , if the error starts with 3 has a value 15. etc How can I do
this? thanks
 
Hi,

If the first character in A1 is numeric, multiply it by 5, otherwise show 0:

=IF(ISNUMBER(LEFT(A1,1)), LEFT(A1,1), 0)*5
 
It looks like my first suggestion was an improper use of the ISNUMBER
function. This seems to work:

=IF(ISERROR(LEFT(A1,1)*5),0,LEFT(A1,1)*5)
 
Excellent thank you

Vergel Adriano said:
It looks like my first suggestion was an improper use of the ISNUMBER
function. This seems to work:

=IF(ISERROR(LEFT(A1,1)*5),0,LEFT(A1,1)*5)
 

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