Macro for Extracting Data

Closed
MHerren Posts 1 Registration date Tuesday March 24, 2015 Status Member Last seen March 24, 2015 - Mar 24, 2015 at 09:53 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Mar 24, 2015 at 12:40 PM
I need helping writing a macro to extract data from column A and input into column B. Example data = 13A:123456789:V1 and what I need is the data between ":", most of the time 9 digits, but sometimes more (so more accurate to state between ":". Once this data is extracted I want it placed in column B, corresponding cells. So it would be original data in A, new extracted data in B. The range is the entire column. Can someone please help?

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Mar 24, 2015 at 12:40 PM
Hi MHerren,

No need for macro here.

The following formula will locate both ":" and takes the value in between:
=MID(A1,SEARCH(":",A1)+1,SEARCH(":",A1,SEARCH(":",A1)+1)-(SEARCH(":",A1)+1))

Best regards,
Trowa
0