If 5th character is number text

cortexnotion

Board Regular
Joined
Jan 22, 2020
Messages
150
Office Version
  1. 2013
Platform
  1. Windows
Hi All

I next to check column 9 and filter if the 5th character is a number or text, but I can't get the syntax right... I'm trying:

VBA Code:
For a = LBound(ArrIN) To UBound(ArrIN)
    If IsNumeric(Mid((a, 9), 5, 1)) Then

and

VBA Code:
For a = LBound(ArrIN) To UBound(ArrIN)
    If IsText(Mid((a, 9), 5, 1)) ThenThen

Any guidance appreciated. Thanks!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
You write too general. Perhaps instead of Mid (a, 9) there should be
VBA Code:
If IsNumeric (Mid ([A9], 5, 1)) Then ...
A9 is cell A9
 
Upvote 0
How about
VBA Code:
If IsNumeric(Mid(ArrIN(a, 9), 5, 1)) Then
 
Upvote 0
N.B. my comment does not relate to VBA but it may be applicable.

The mid of a string will yield text; +0 or -- will coerce the text to numeric.

T202007c.xlsm
BC
2ABCD5FTRUE
1e
Cell Formulas
RangeFormula
C2C2=ISNUMBER(--MID(B2,5,1))
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,020
Messages
6,122,709
Members
449,093
Latest member
Mnur

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