Link to home
Start Free TrialLog in
Avatar of Fordraiders
FordraidersFlag for United States of America

asked on

Extract Number from AlphaNumeric string

excel 2010 vba:


What I need:
str2  is a string variable
falpha is just my holder variable

str2 usually is  something like:   B2  C3   D34   B21   AC3    DE45    etc...

What I need:
I need a variable just to hold the Numeric part of the str2


The code below with extract the alpha part i need
If IsNumeric(Mid(str2, 2, 1)) Then
            falpha = Left(str2, 1)
       Else
              falpha = Left(str2, 2)
       End If
       
          str = falpha

Open in new window



Thanks
fordraiders
SOLUTION
Avatar of als315
als315
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fordraiders

ASKER

Thanks