Forum

Macro / VBA to extr...
 
Notifications
Clear all

Macro / VBA to extract number from character string

3 Posts
2 Users
0 Reactions
150 Views
(@paulvz)
Posts: 4
Active Member
Topic starter
 

Hi,

I have some information that has been retrieved from mag swipe reads (membership cards) where only a certain part of the information relates to the membership number. A sample of the swipe is shown below 

%B90360027238976565^ /^0000720100100329?

What I want to do is separate out the numbers shown in red. Every line has the same length of characters, with the same 8 digits being the required info.

Any help/advice would be much appreciated.

 

thanks and regards

Paul

 
Posted : 07/06/2017 1:57 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Paul

You can try a formula instead of a macro. Assuming the info is in cell A1, in cell B1 enter

=MID(A1,11,8)

Copy down to as many rows as needed.

See if this helps.

Sunny

 
Posted : 07/06/2017 2:09 am
(@paulvz)
Posts: 4
Active Member
Topic starter
 

thanks Sunny.

That's perfect. 

 

cheers, Paul

 
Posted : 10/06/2017 6:04 pm
Share: