Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine whether a cell value's first character is numeric or text?

I am trying to find a good way to use Excel to determine whether a cell's first character is a number or a letter. I am using this to determine a flag that gets marked or not depending on the answer. Here is an example table:

**Status    Code**
Inactive    2AJ
Active      ALO
Active      PN9
Active      Y2Y
Inactive    1P9

Essentially, if the beginning character of the Code column is a numeric value, the Status column should show "Inactive". Currently I have this and it doesn't work:

=IF(ISNUMBER(LEFT(B1,1)),"Inactive","Active")
like image 276
Joshua Burton Avatar asked Oct 28 '14 18:10

Joshua Burton


1 Answers

Formula:

=IF(ISNUMBER(VALUE(LEFT(B2,1))),"Inactive","Active")

You were trying to see if a number stored as a string was a number. This fixes that issue.

like image 63
Mr. Mascaro Avatar answered Sep 17 '22 15:09

Mr. Mascaro