Use ISTEXT or ISNUMBER with Right Function

pto160

Active Member
Joined
Feb 1, 2009
Messages
482
Office Version
  1. 365
Platform
  1. Windows
When I use the ISNUMBER or ISTEXT function for the whole cell, it gives me the correct true or false result. When I use the ISNUMBER OR ISTEXT with the right function to extract the last 3 characters it is giving me the incorrect results. I want Excel to see the the last 3 characters as if it is the whole cell so it gives me the correct TRUE or FALSE result. So C12052005 is 005 or 5 (the last 3 characters) which is a number. C12052005A is 05A which is text. Here is an example.
Unique List_Frequency.xlsx
ABC
1ISNUMBERISTEXT
21TRUEFALSE
3AFALSETRUE
4BFALSETRUE
52TRUEFALSE
6
7C12052005FALSETRUE
8C12052005AFALSETRUE
9C12052005BFALSETRUE
10C12052002FALSETRUE
Sheet3
Cell Formulas
RangeFormula
B2:B5B2=ISNUMBER(A2)
C2:C5C2=ISTEXT(A2)
B7:B10B7=ISNUMBER(RIGHT(A7,3))
C7:C10C7=ISTEXT(RIGHT(A7,3))
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Great. Thanks. How would you use it if you want to use the ISTEXT function?
 
Upvote 0
ISTEXT is not flexible like ISNUMBER but you can do that
Book1
ABC
6C12052005TRUEFALSE
7C12052005AFALSETRUE
8C12052005BFALSETRUE
9C12052002TRUEFALSE
Sheet3
Cell Formulas
RangeFormula
B6:B9B6=ISNUMBER(--RIGHT(A6,3))
C6:C9C6=ISTEXT(IFERROR(--RIGHT(A6,3),"x"))
 
Last edited:
Upvote 0
Great. Thanks. (y) That works. So the right function treats the extracted text as a text string unless you convert it a number.
 
Upvote 0
functions RIGHT, LEFT, MID and some more are text functions so if you want result as number you will need to *1 or +0 or use double --
 
Upvote 0
Solution

Forum statistics

Threads
1,224,800
Messages
6,181,045
Members
453,014
Latest member
Chris258

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top